Closed jgphilpott closed 7 months ago
Uhm, I think this PR is modifying the "dukpy" command, not what happens when you import the dukpy module.
Instead I was suggesting we could add a if __name__ == '__main__':
section to dukpy/__init__.py
so that when python -m dukpy
is used it can do things different than running code.
Alternatively, you can also register a dukpy-compile
command in setup.py
so that we have dukpy
to run code and dukpy-compile
to transpile code.
Okay @amol- I will look into making some of those changes sometime in the next few weeks and will get back to you. Thanks!
Hey @amol-
I have put together a ruff copy of the compile updates I was wanting to see. I tried to follow the
python -m dukpy lang input output
format you suggested in the issue I opened. More work is still required to get this PR fully ready but I wanted to get your input/feedback before doing more.I have tested it on a few files and it works well! Some other updates could include:
Let me know what you think thus far!
Peace, Jacob Philpott