|
|
|
|
|
by joseph8th
4208 days ago
|
|
I like it! Simplest use case it saves on boilerplate required by argparse. [1] But the potential for embedded apps is the real draw for me. I have a CLI app I'd like to provide a notebook GUI for... This would be perfect. Just swap out argparse for clip.py, write the embed script and the GUI can use the same methods. No need to code additional logic to handle GUI widgets. I wonder how hard it would be to make my 'shkeleton' CLI parser embeddable -- it's basically argparse for bash scripting right now. [2] [1] https://docs.python.org/2/howto/argparse.html [2] https://github.com/joseph8th/shkeleton |
|
Well, my definition of "embeddable" is a very loose one. All you really need to be able to do is allow the user to specify in/out/err streams, so that they could be anything: a log file, a socket, a Python function, etc. So maybe keep a var for each of these and redirect the echos to them?