TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Gooey: Turn almost any Python command line program into a full GUI application

769 点作者 lsferreira42超过 1 年前

32 条评论

goostavos超过 1 年前
Hey, what the -- this is my thing. ^_^ What&#x27;s it doing at the top of HN?<p>A quick reply to some of the comments about argparse. Gooey is super old at this point. Argparse was a solid choice at the time when Gooey started. These days, Gooey itself speaks in JSON and is decoupled from argparse itself. However, argparse remains the main &quot;blessed&quot; interface (mostly because nobody else has built a different one).<p>Some fun FYIs: You can also invoke any arbitrary executable[0], not just python, which is pretty handy.<p>Re: last commit being 2 years ago. It gets harder to justify working for free on niche software as you get older and priorities change :( If it&#x27;s any consolation, I DO feel guilty all the time. I have no idea why, but where I live, there&#x27;s &quot;GOOEY&quot; graffiti tagged all over the place, so it&#x27;s a nice ever-present reminder of the issue tracker that&#x27;s currently going unloved. haha.<p>[0] <a href="https:&#x2F;&#x2F;chriskiehl.com&#x2F;article&#x2F;gooey-as-a-universal-frontend" rel="nofollow noreferrer">https:&#x2F;&#x2F;chriskiehl.com&#x2F;article&#x2F;gooey-as-a-universal-frontend</a>
评论 #38588218 未加载
评论 #38587910 未加载
评论 #38588122 未加载
评论 #38590889 未加载
评论 #38591278 未加载
评论 #38673163 未加载
评论 #38590550 未加载
SOLAR_FIELDS超过 1 年前
Shouldn&#x27;t this be qualified with &quot;argparse-based&quot;?<p>Argparse is good for simple stuff but there are many Click based CLI&#x27;s and a lot of popular CLI libraries build on top of Click. There are also other Python CLI tools that aren&#x27;t built on argparse or Click, though I will say that these two are probably the most popular ones.<p>Is this confirmed to work with Click? I only see references to argparse. I would go so far to say, if the answer is no, that &quot;almost any&quot; is a flat out lie, and a much more accurate title would be &quot;Turn almost any argparse-based Python command line program into a full GUI application&quot;.<p>Also, the last substantial commit was over two years ago. This isn&#x27;t itself a bad thing, but given the open issue count does not really signal confidence in the project.<p>Otherwise it is a cool project. I would like to see more of this - it&#x27;s one of those neat force multipliers, as referenced in the README, that some enterprising person could implement as a CLI and then share their automation for the rest of the nontechnical office in an easy way. Kind of like how Access did the same thing for DB&#x27;s. Like Access, you would butt up against limitations once you started to introduce some level of size or complexity, but it could be &quot;good enough&quot; for a lot of small office use cases.
评论 #38588892 未加载
评论 #38587478 未加载
评论 #38590394 未加载
评论 #38588212 未加载
dang超过 1 年前
Related:<p><i>Gooey: Turn almost any Python command line program into a GUI application</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=27490291">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=27490291</a> - June 2021 (115 comments)<p><i>Gooey: Turn command line programs into GUI applications</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=8218785">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=8218785</a> - Aug 2014 (74 comments)
dietr1ch超过 1 年前
I wish that the OS and shell had better insight on how to run programs without need for specific library parsing libraries.<p>I&#x27;d love to see programs communicate through a typed JSON&#x2F;proto format that shed enough details to make this more independent, and get useful shell command structuring&#x2F;completion or full blown GUIs from simply introspecting the expected input and output types.<p>Today it seems that the best you can get is still made out of carefully placed straws as programs need to export completion files to many shells, there&#x27;s vastly different styles for flags across programs and parsing libraries, and obviously, there&#x27;s no GUIs around.
评论 #38590124 未加载
评论 #38588355 未加载
评论 #38593162 未加载
warangal超过 1 年前
I sometimes find GUIs equivalent to comfort-food as you can just stroll through a gui interface without lot of cognitive overload that may come from a rarely used CLI.<p>A bit tangential to current discussion, but i came across CUDATEXT editor a few months ago here which provides a single file python API to let me use arbitrary GUI elements like MENU, INPUTS etc which editor is itself using. I currently generate my blog from editor itself with configuration done through these simple GUI elements.
blamazon超过 1 年前
See also:<p>&quot;Textual: lean application framework for Python. Build sophisticated user interfaces with a simple Python API. Run your apps in the terminal and a web browser.&quot; [1]<p>[1]: <a href="https:&#x2F;&#x2F;github.com&#x2F;textualize&#x2F;textual&#x2F;">https:&#x2F;&#x2F;github.com&#x2F;textualize&#x2F;textual&#x2F;</a>
评论 #38588484 未加载
评论 #38587166 未加载
评论 #38587685 未加载
enjrolas超过 1 年前
Hey, I just want to say thanks for making this wonderful piece of software! I love gooey and have used it extensively for several different programs. For me, it perfectly fits this area where you have a python script that does something important, and now you need to set it up so that non-programmers can use it as well.
cztomsik超过 1 年前
This reminds me naked objects. The idea was that you only define Java classes with some annotations + theme and the whole GUI (or web frontend) application will be generated for you.<p>Very cool idea but it never worked out (to my knowledge).
评论 #38590633 未加载
nathanfig超过 1 年前
I would love something that could do the reverse.
评论 #38587080 未加载
评论 #38587056 未加载
评论 #38587801 未加载
ksherlock超过 1 年前
With the old Macintosh Programmer&#x27;s Workshop (MPW; a text-based shell for Mac OS of the 80s and 90s) there was similar functionality called Commando for almost every command. The commando information was kept in a &#x27;cmdo&#x27; resource. Something similar could be done today with extended attributes, if support wasn&#x27;t so hit or miss.<p>Oh, apparently, A&#x2F;UX had commando as well. If you double-clicked a terminal command from the Finder, it would pop up the commando box to choose your CLI options, then run it in a shell window. Today, running a terminal command from Finder just runs it without any arguments in a shell window.<p><a href="https:&#x2F;&#x2F;cohost.org&#x2F;boredzo&#x2F;post&#x2F;804893-i-still-want-a-moder" rel="nofollow noreferrer">https:&#x2F;&#x2F;cohost.org&#x2F;boredzo&#x2F;post&#x2F;804893-i-still-want-a-moder</a><p><a href="http:&#x2F;&#x2F;toastytech.com&#x2F;guis&#x2F;aux3.html" rel="nofollow noreferrer">http:&#x2F;&#x2F;toastytech.com&#x2F;guis&#x2F;aux3.html</a>
theoogway超过 1 年前
Wow, what a nice coincidence to see this on HN! Just two days ago, I was hacking up a similar project. <a href="https:&#x2F;&#x2F;github.com&#x2F;livetheoogway&#x2F;python-uime">https:&#x2F;&#x2F;github.com&#x2F;livetheoogway&#x2F;python-uime</a> This one is a much smaller hack to spruce up your local scripts. Although it&#x27;s still a work in progress with features pending, I&#x27;d really appreciate any initial feedback or thoughts. Thanks for checking it out!<p>[0] <a href="https:&#x2F;&#x2F;github.com&#x2F;livetheoogway&#x2F;python-uime">https:&#x2F;&#x2F;github.com&#x2F;livetheoogway&#x2F;python-uime</a>
评论 #38591310 未加载
Levitating超过 1 年前
There are also similar applications for usage with clap-rs.[1][2]<p>[1]: <a href="https:&#x2F;&#x2F;github.com&#x2F;MichalGniadek&#x2F;klask">https:&#x2F;&#x2F;github.com&#x2F;MichalGniadek&#x2F;klask</a><p>[2]: <a href="https:&#x2F;&#x2F;github.com&#x2F;grantshandy&#x2F;claui">https:&#x2F;&#x2F;github.com&#x2F;grantshandy&#x2F;claui</a>
hoten超过 1 年前
How would one integrate this with a CLI tool that expects some user input during execution?<p>Would love to package this around a bisect script I use to debug issues for my game engine. Giving it a GUI would make it possible to share it with users such that they too can help bisect problems.
agumonkey超过 1 年前
there&#x27;s a near complete isomorphism between cli&#x2F;tui arg parse and web url routing<p>someone is surely doing a smalltalkish metaclass trick to turn any object into a local tty or http or rest or else interfaced thing
评论 #38590618 未加载
评论 #38587709 未加载
Cloudef超过 1 年前
Did something similar with my pokemon emerald randomizer. This parses output of wasm&#x2F;wasi program&#x27;s --help output and generates a web interface <a href="https:&#x2F;&#x2F;cloudef.github.io&#x2F;pokeemerald-randomizer&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;cloudef.github.io&#x2F;pokeemerald-randomizer&#x2F;</a> the aruments are then passed to the wasi&#x2F;wasm binary to generate the final rom.
metadat超过 1 年前
I wonder if Gooey could be made to target generating a React or even JS-free vanilla web app, instead of a native GUI?<p>In spirit, Gooey reminds me of one of my favorite low-code tools for technically savvy individuals to put a web frontend in front of arbitrary CLI programs:<p>Python Script Server<p><a href="https:&#x2F;&#x2F;github.com&#x2F;bugy&#x2F;script-server">https:&#x2F;&#x2F;github.com&#x2F;bugy&#x2F;script-server</a>
评论 #38594198 未加载
评论 #38591866 未加载
29athrowaway超过 1 年前
See also: Zenity, KDialog and GNU Dialog.
jll29超过 1 年前
Nice.<p>Now we&#x27;d like the converse program: one that transforms any GUI application into a cmdline tool or wraps it. ;-)
rodneyzeng超过 1 年前
Is there an counterpart tool for ffmpeg with those parameters in GUI? That would be an omnipower app...
评论 #38589868 未加载
评论 #38589999 未加载
评论 #38589837 未加载
unnouinceput超过 1 年前
And then there is me who tries to fight with all my clients to have their GUI friendly applications to, at least, have command parameters, so that it can be automated through services&#x2F;task scheduler&#x2F;cron
amai超过 1 年前
Would be nice to combine this with Google Fire: <a href="https:&#x2F;&#x2F;google.github.io&#x2F;python-fire&#x2F;guide&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;google.github.io&#x2F;python-fire&#x2F;guide&#x2F;</a>
hesnuts超过 1 年前
Does this only build Windows applications, or can it do the same for MacOS&#x2F;Linux?<p>be great if you could build&#x2F;package python code easily to run on native OS&#x27;s without having the user install python, etc first.
评论 #38587186 未加载
评论 #38603864 未加载
broner超过 1 年前
Reminds me of this previous HN submission Blotato: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=38206235">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=38206235</a>
mppowers超过 1 年前
Cool! I&#x27;ve wanted to write something similar to turn a python cli into a web app, something like those sites that convert file types but general purpose.
评论 #38594120 未加载
评论 #38594099 未加载
inetknght超过 1 年前
I&#x27;ve wondered about doing something like this in C++ with imgui and boost program_options.<p>I&#x27;m very happy to see an example of it already done in Python!
stormking超过 1 年前
Generating a graphical form for the options and arguments does not turn a command line program into &quot;a full GUI application&quot;.
emmet超过 1 年前
Very happy to see something like this! Wish it had been around years ago to save me the hours I spent wrangling gui2py
评论 #38587593 未加载
zikohh超过 1 年前
Does this work with any OS?
DeathArrow超过 1 年前
So is it a kind of Swagger for command line apps?
Alifatisk超过 1 年前
That&#x27;s incredible
sim7c00超过 1 年前
looks pretty neat honestly to make ur programs more easily accessible. gui programming is always such a mess!. hunter42 :&#x27;).
dragonwriter超过 1 年前
&quot;Almost any Python command line program&quot; seems to be an exaggeration. It relies on the command-line program using argparse, and explicitly doesn&#x27;t work for any that rely on optparse, which, sure, is older, but also means that things which rely on the popular Click command-line library won&#x27;t work either.
评论 #38587289 未加载