Re:Gooey: Turn almost any Python command line program into a...
by nathanfig on Saturday December 09, 2023 @05:56PM
(#38587007)
I would love something that could do the reverse.
[ Parent
| on HN ]
Re:Gooey: Turn almost any Python command line program into a...
by andy99 on Saturday December 09, 2023 @06:04PM
(#38587080)
I would like to be able to use a gui to set up parameter sweeps based on info pulled from argparse and then convert back to a shell script that runs and saves the output sensibly.
Re:Gooey: Turn almost any Python command line program into a...
by nathanfig on Sunday December 10, 2023 @12:24AM
(#38589357)
Not quite; turn any GUI application into a Python command line program.
Re:Gooey: Turn almost any Python command line program into a...
by rocqua on Sunday December 10, 2023 @04:38AM
(#38590384)
This feels maybe possible with QT. Since the inputs are all defined in code.
Re:Gooey: Turn almost any Python command line program into a...
by blooop on Sunday December 10, 2023 @02:22PM
(#38594088)
I'm trying to solve the part of the problem that generates the output, the argparse part would not be that hard to write.
Re:Gooey: Turn almost any Python command line program into a...
by SOLAR_FIELDS on Saturday December 09, 2023 @06:02PM
(#38587056)
A WYSIWYG editor that spits out a CLI you mean? That would pretty neat, though I think would necessarily be kind of constrained. I wonder who has tried that approach, I can't think of any examples
Re:Gooey: Turn almost any Python command line program into a...
by andy99 on Saturday December 09, 2023 @06:31PM
(#38587316)
Actually, something like a "zotero for argparse" would be cool. Where you enter arguments, their type, help string, defaults etc in a gui and then you can check the ones you need for a given python script and copy the relevant python code into your paste buffer.
I don't think it would be a massive time saver however what I usually do now is find some previous script that had similar arguments and copy them, and then copy-paste-edit to add new arguments.
The other advantage is you could enter the arguments agnostically and export as whatever language you're working in.
Re:Gooey: Turn almost any Python command line program into a...
by exe34 on Saturday December 09, 2023 @07:00PM
(#38587533)
http://docopt.org/
Not quite what you asked for, but close: type example invocations to generate the CLI, and just pull the arguments from a dictionary at runtime.
Re:Gooey: Turn almost any Python command line program into a...
by jmfldn on Saturday December 09, 2023 @07:41PM
(#38587801)
Chatgpt soon probably!
Re:Gooey: Turn almost any Python command line program into a...
by unnouinceput on Sunday December 10, 2023 @04:19PM
(#38595165)
how? you're going to modify the binary so that it can accept command line parameters? or clone the GUI's functionality in a CLI? that's akin to just creating the application from scratch.