-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
documenting script parser thing #33
base: main
Are you sure you want to change the base?
Conversation
I did some unholy things in this, goddamn
There was a problem hiding this 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?
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 |
There was a problem hiding this comment.
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 -> ")) |
There was a problem hiding this comment.
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())
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes
also @Gusic06 did you test it to see if it breaks any normal command or init process? |
I did some unholy things in this, goddamn