-
Notifications
You must be signed in to change notification settings - Fork 15
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
Make callable from Python #2
Comments
Hello! The easyucs.py script is already calling a bunch of functions (like import_config, push_config, etc.), though it does also have some logic itself to handle complex cases like doing both a reset and a setup in a single command. I'd like to avoid changing too much the way EasyUCS is executed today - since most people are using it as a simple tool without needing to include it in a larger Python project. However I think being able to use EasyUCS as a Python module could be very useful as it could open some interesting possibilities. |
It's great to hear back from you so quickly! I see where you're coming from with not changing the invocation methods. If you think it's an acceptable to change to invoke as I think it would be possible to include the |
As for being an installable Pip module, I've made some great progress. I'm going to open a in-dev PR shortly, so you can comment directly. |
Hello!
I am looking into calling EasyUCS from a Python module. Ideally, this would look like the existing
easyucs.py
script decomposed into a handful of functions that validate their arguments like the currentargparse
ones are validated.This is a reasonably tall order, of course, and demands some pretty major restructuring. I think the pieces are these:
distutils
/pip
, so that it can be imported sanely.easyucs.py
andeasyucs_gui.py
tooling and documentation to be invoked as Python modules, so that both the newdistutils
/pip
install and the existing "invoke from the current working directory" methods work as expectedpython -m easyucs.easyucs <cmdline_arguments>
orpython -m easyucs.easyucs_gui <cmdline_arguments>
. Perhapseasyucs
andeasyucs_gui
scripts could be installed to make those invocations easier.)easyucs.py
into one or a few high-level functions elsewhere in the package thateasyucs.py
can then import, and call after parsing its arguments like today.I will submit a pull request soon that addresses most of points 1 and 2, but would appreciate your (@vesposito) input.
The text was updated successfully, but these errors were encountered: