Skip to content

Conversation

Gusic06
Copy link
Collaborator

@Gusic06 Gusic06 commented Feb 18, 2024

I did some unholy things in this, goddamn

I did some unholy things in this, goddamn
Copy link
Owner

@ScottN13 ScottN13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can it run other things aside from .py?

@ScottN13 ScottN13 added enhancement New feature or request help wanted Extra attention is needed labels Feb 18, 2024
with open(".\\boxpyshell.py", "r") as file:
_contents = file.read()
new_contents = f"import {script_name}\n{_contents}\nelif command == '{command_name}':\n {function_name}({*args}, {**kwargs})"
new_contents = f"import {script_name}\n{_contents}\nelif command == '{command_name}':\n {function_name}({*args}, {**kwargs})" # tbh idk what this does, but it works.. I think
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you don't know then don't comment it. This is unnecessary.

def build_file(self, name: str) -> None:
self._contents = self.get_script_from_user(input("Path to the Script file -> "))
self.name = f"{name}.py" if name[-3:] != ".py" else name
self._contents: str = self.get_script_from_user(input("Path to the Script file -> "))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you want to set the type then instead of doing ```
var: str = ...

Rather do

var = str(input())

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes

@ScottN13
Copy link
Owner

also @Gusic06 did you test it to see if it breaks any normal command or init process?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request help wanted Extra attention is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants