-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Description
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 current argparse ones are validated.
This is a reasonably tall order, of course, and demands some pretty major restructuring. I think the pieces are these:
- Make EasyUCS into a package that can be installed with
distutils/pip, so that it can be imported sanely. - Adjust the
easyucs.pyandeasyucs_gui.pytooling and documentation to be invoked as Python modules, so that both the newdistutils/pipinstall and the existing "invoke from the current working directory" methods work as expected- (This would look like
python -m easyucs.easyucs <cmdline_arguments>orpython -m easyucs.easyucs_gui <cmdline_arguments>. Perhapseasyucsandeasyucs_guiscripts could be installed to make those invocations easier.)
- (This would look like
- Move the program logic and input validation in
easyucs.pyinto one or a few high-level functions elsewhere in the package thateasyucs.pycan 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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels