On 2011-01-22, geremy condra <debat...@gmail.com> wrote:
> If windows doesn't matter to you, just use Zenity. Here's a python
> function wrapping zenity that does what you want:
>
> import commands
>
> def confirm_or_edit(s):
>     zenity = 'zenity'
>     mode = '--entry'
>     text = "--text='Please confirm or edit the following string:'"
>     title = "--title='confirm or edit'"
>     entry = "--entry-text='%s'" % s
>     cmd = ' '.join([zenity, mode, text, title, entry])
>     status, output = commands.getstatusoutput(cmd)
>     if status: raise Exception("Couldn't run zenity")
>     return output
>
> There's also a full-blown API for zenity, but this should do what you want.

Very, very nice. Thanks !

I'm amazed at how many GUI's are available.


No wonder I couldn't find "the" interface, there are too many.   :-)




-- 
When in doubt, use brute force.
                -- Ken Thompson
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to