Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #99663

Re: askopenfilename()

From Christian Gollwitzer <auriocus@gmx.de>
Newsgroups comp.lang.python
Subject Re: askopenfilename()
Date 2015-11-28 14:34 +0100
Organization A noiseless patient Spider
Message-ID <n3cacj$o5$1@dont-email.me> (permalink)
References (7 earlier) <mailman.509.1448009036.16136.python-list@python.org> <n2vgq3$76g$1@news2.informatik.uni-stuttgart.de> <n3bvn3$k2f$1@news2.informatik.uni-stuttgart.de> <n3c3vu$a8t$1@dont-email.me> <n3c7rb$m4v$1@news2.informatik.uni-stuttgart.de>

Show all headers | View raw


Am 28.11.15 um 13:48 schrieb Ulli Horlacher:
> Christian Gollwitzer <auriocus@gmx.de> wrote:
>> Many problems would simply go away if you wrote the whole thing as a GUI
>> program.
>
> Too much hassle.
> The predecessor was a Perl/Tk program and I have had to invest 90% of the
> programming work into the GUI handling. No fun at all.

As I see it, the program consists only of user interface - or is there 
any "algorithm" working behinds the scenes? Maybe you could pass the 
task on to somebody who enjoys GUI programming?

> Now, with fexit in Python, I skipped most of these problems.
> The only GUI part is the file selection.
>
>
>> If I understand correctly, what you want - a program to select files and
>> folders to upload to your server
>
> This is only one of the tasks. The main menu looks:
>
> [s]  send a file or directory
> [g]  get a file
> [c]  change login data (user, server, auth-ID)
> [l]  login with webbrowser
> [u]  update fexit
> [h]  help
> [q]  quit

All of this is easily integrated into a GUI like the one I posted (have 
you tried it?), either as a button or as a menu entry. IMO the most 
common GUI pattern for this kind of thing is a side-by-side view of the 
directories on the server and on the client, and a button (or 
drag'n'drop) to move files between both views. I understand this is not 
as easy as the script posted by me - nonetheless quite doable. For an 
experienced GUI script writer it'll take a weekend to get the basics 
running.

> (with more features to come in the future)
>
> And the CLI:
>
> framstag@juhu:~: ./fexit.py -h
> usage: fexit [-C "comment"] [-a container] file(s) recipient[,...]
> example: fexit flupp.avi framstag@rus.uni-stuttgart.de
> example: fexit -C "more data" -a labdata *.png x1@flupp.org,x2@flupp.org
>
> usage: fexit FEX-download-URL
> example: fexit http://fex.rus.uni-stuttgart.de/fop/jHn34yp7/flupp.avi
>

This part should probably stay as it is. For a command line tool, an 
scp-like interface seems well-fitting. But for guided user input, an 
interface which prompts the user for input has never been a good 
solution. You have to work very hard to make that convenient. Have a 
look at lftp, for instance. In the end, real GUI programming will be 
easier (and more accessible)

A (still) alternative solution would be an interface to the OS to make 
it a remote mounted folder (works for WebDAV on any modern OS, for 
instance) or a daemon, which watches and synchronizes a directory (this 
is how Dropbox works). This way it feels much more integrated to the 
user - they can use whatever file manager they like to do the transfer, 
or even "save" from any application (like Word, Firefox, ...) into the 
remote folder.

	Christian

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

non-blocking getkey? Ulli Horlacher <framstag@rus.uni-stuttgart.de> - 2015-11-18 08:39 +0000
  Re: non-blocking getkey? Christian Gollwitzer <auriocus@gmx.de> - 2015-11-18 10:14 +0100
    Re: non-blocking getkey? Ulli Horlacher <framstag@rus.uni-stuttgart.de> - 2015-11-18 10:39 +0000
      Re: non-blocking getkey? Ulli Horlacher <framstag@rus.uni-stuttgart.de> - 2015-11-18 11:01 +0000
        Re: non-blocking getkey? Christian Gollwitzer <auriocus@gmx.de> - 2015-11-18 12:17 +0100
        Re: non-blocking getkey? Terry Reedy <tjreedy@udel.edu> - 2015-11-18 07:26 -0500
          Re: non-blocking getkey? Ulli Horlacher <framstag@rus.uni-stuttgart.de> - 2015-11-18 13:06 +0000
            Re: non-blocking getkey? Chris Angelico <rosuav@gmail.com> - 2015-11-19 00:24 +1100
              Re: non-blocking getkey? Ulli Horlacher <framstag@rus.uni-stuttgart.de> - 2015-11-18 13:57 +0000
            Re: non-blocking getkey? Steven D'Aprano <steve@pearwood.info> - 2015-11-19 00:38 +1100
              Re: non-blocking getkey? Ulli Horlacher <framstag@rus.uni-stuttgart.de> - 2015-11-18 13:51 +0000
                Re: non-blocking getkey? Chris Angelico <rosuav@gmail.com> - 2015-11-19 01:01 +1100
                Re: non-blocking getkey? Jussi Piitulainen <harvesting@makes.invalid> - 2015-11-18 16:13 +0200
        Re: non-blocking getkey? Ulli Horlacher <framstag@rus.uni-stuttgart.de> - 2015-11-18 16:50 +0000
          Re: non-blocking getkey? Terry Reedy <tjreedy@udel.edu> - 2015-11-18 12:55 -0500
            Re: non-blocking getkey? Ulli Horlacher <framstag@rus.uni-stuttgart.de> - 2015-11-19 15:48 +0000
              Re: non-blocking getkey? Michael Torrie <torriem@gmail.com> - 2015-11-19 09:31 -0700
              Re: non-blocking getkey? eryksun <eryksun@gmail.com> - 2015-11-20 02:43 -0600
                Re: non-blocking getkey? Ulli Horlacher <framstag@rus.uni-stuttgart.de> - 2015-11-23 17:01 +0000
                askopenfilename() (was: Re: non-blocking getkey?) Ulli Horlacher <framstag@rus.uni-stuttgart.de> - 2015-11-28 10:29 +0000
                Re: askopenfilename() Christian Gollwitzer <auriocus@gmx.de> - 2015-11-28 12:45 +0100
                Re: askopenfilename() Ulli Horlacher <framstag@rus.uni-stuttgart.de> - 2015-11-28 12:48 +0000
                Re: askopenfilename() Christian Gollwitzer <auriocus@gmx.de> - 2015-11-28 14:34 +0100
                Re: askopenfilename() Ulli Horlacher <framstag@rus.uni-stuttgart.de> - 2015-11-28 16:45 +0000
                Re: askopenfilename() Laura Creighton <lac@openend.se> - 2015-11-28 17:02 +0100
                Re: askopenfilename() Ulli Horlacher <framstag@rus.uni-stuttgart.de> - 2015-11-28 16:05 +0000
        Re: non-blocking getkey? Ulli Horlacher <framstag@rus.uni-stuttgart.de> - 2015-12-10 08:28 +0000
          Re: non-blocking getkey? Christian Gollwitzer <auriocus@gmx.de> - 2015-12-10 09:54 +0100
            Re: non-blocking getkey? Ulli Horlacher <framstag@rus.uni-stuttgart.de> - 2015-12-10 10:26 +0000
          Re: non-blocking getkey? Christian Gollwitzer <auriocus@gmx.de> - 2015-12-10 09:57 +0100
            Re: non-blocking getkey? Ulli Horlacher <framstag@rus.uni-stuttgart.de> - 2015-12-10 10:40 +0000
          Re: non-blocking getkey? Ulli Horlacher <framstag@rus.uni-stuttgart.de> - 2015-12-10 15:52 +0000
    Re: non-blocking getkey? eryksun <eryksun@gmail.com> - 2015-11-18 12:24 -0600

csiph-web