Skip to content

documenting script parser thing#33

Open
Gusic06 wants to merge 1 commit into
mainfrom
Gusic06-patch-1
Open

documenting script parser thing#33
Gusic06 wants to merge 1 commit into
mainfrom
Gusic06-patch-1

Conversation

@Gusic06

@Gusic06 Gusic06 commented Feb 18, 2024

Copy link
Copy Markdown
Collaborator

I did some unholy things in this, goddamn

I did some unholy things in this, goddamn

@ScottN13 ScottN13 left a comment

Copy link
Copy Markdown
Owner

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
Comment thread scriptparser.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

Copy link
Copy Markdown
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.

Comment thread scriptparser.py
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Owner

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

@TRC-Loop

Copy link
Copy Markdown
Collaborator

yes

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