-
Notifications
You must be signed in to change notification settings - Fork 72
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
Add run python3 #520
Add run python3 #520
Conversation
This commit includes a new function `cli_start_python3` which executes Python3 scripts from within the CLI. The function operates as a new command in the CLI interface, accepting a path to the script as an argument. This enhancement improves the versatility of the Clixon CLI interface by allowing direct execution of Python scripts.
This commit includes a new function `cli_start_python3` which executes Python3 scripts from within the CLI. The function operates as a new command in the CLI interface, accepting a path to the script as an argument. This enhancement improves the versatility of the Clixon CLI interface by allowing direct execution of Python scripts.
What are the advantage over adding a shebang for Python3 in the script and then use something like this in the CLI specification?
Any Python script can then be called as long as
|
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.
This is a generated file and should most probably not be here (unless you changed configure.ac)
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.
I agree, this is a mistake, I'm sorry
It would be nice to add a documentation section somewhere here: https://clixon-docs.readthedocs.io/en/latest/cli.html on how to use scripts (specifically python) as callbacks. |
I'll try to do it now |
You need to checkout the old version of configure for tests to parse |
|
I see you close this PR. I think it is important to improve the scripting interface, and also its documentation, and I think your comments made sense. Are you planning to make a new PR? |
yes, I will correct the comments, they were correct, and make a new pool request |
This commit includes a new function
cli_start_python3
which executes Python3 scripts from within the CLI. The function operates as a new command in the CLI interface, accepting a path to the script as an argument. This enhancement improves the versatility of the Clixon CLI interface by allowing direct execution of Python scripts.