Re: Tk alternative to askopenfilename and askdirectory?

2015-12-18 Thread Ulli Horlacher
Christian Gollwitzer wrote: > Tk calls out into the native file manager to perform the file/open > operation (on Win&Mac, on Unix it brings it's own). This means, on Windows the user gets a "well known" file/directory browser? Then this is an important feature! Anything new and unknown is bad f

Re: Tk alternative to askopenfilename and askdirectory?

2015-12-18 Thread Christian Gollwitzer
Am 16.12.15 um 14:18 schrieb Ulli Horlacher: Is there an alternative to Tk's askopenfilename() and askdirectory()? I want to select a files and directories within one widget, but askopenfilename() let me only select files and askdirectory() let me only select directories. Tk calls out

Re: Tk alternative to askopenfilename and askdirectory?

2015-12-17 Thread Ulli Horlacher
Rick Johnson wrote: > Oh i understand. What you opine for is something like: askOpenFileOrDir() > -- which displays a dialog from which a file or directory can be selected > by the user. Yes, exactly! Now: how? -- Ullrich Horlacher Server und Virtualisierung Rechenzentrum IZUS/TI

Re: Tk alternative to askopenfilename and askdirectory?

2015-12-16 Thread Rick Johnson
On Wednesday, December 16, 2015 at 7:19:25 AM UTC-6, Ulli Horlacher wrote: > Is there an alternative to Tk's askopenfilename() and askdirectory()? > > I want to select a files and directories within one widget, but > askopenfilename() let me only select files and askdirect

Re: Tk alternative to askopenfilename and askdirectory?

2015-12-16 Thread Ulli Horlacher
Lorenzo Sutton wrote: > On 16/12/2015 14:18, Ulli Horlacher wrote: > > Is there an alternative to Tk's askopenfilename() and askdirectory()? > > > > I want to select a files and directories within one widget, but > > askopenfilename() let me only select file

Re: Tk alternative to askopenfilename and askdirectory?

2015-12-16 Thread Lorenzo Sutton
On 16/12/2015 14:18, Ulli Horlacher wrote: Is there an alternative to Tk's askopenfilename() and askdirectory()? I want to select a files and directories within one widget, but askopenfilename() let me only select files and askdirectory() let me only select directories. I guess it

Tk alternative to askopenfilename and askdirectory?

2015-12-16 Thread Ulli Horlacher
Is there an alternative to Tk's askopenfilename() and askdirectory()? I want to select a files and directories within one widget, but askopenfilename() let me only select files and askdirectory() let me only select directories. -- Ullrich Horlacher Server und Virtualisi

Re: askopenfilename()

2015-11-28 Thread Ulli Horlacher
Christian Gollwitzer wrote: > Am 28.11.15 um 13:48 schrieb Ulli Horlacher: > > Christian Gollwitzer 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% o

Re: askopenfilename()

2015-11-28 Thread Ulli Horlacher
Ulli Horlacher wrote: > One of my Windows test users reports, that the file dialog window of > askopenfilename() starts behind the console window and has no focus. I have got a followup: this happens only with Windows XP, not with Windows 7. Therefore I will ignore this p

Re: askopenfilename()

2015-11-28 Thread Laura Creighton
Maybe Wei Li Jiang's hack will work for you? http://stackoverflow.com/questions/3375227/how-to-give-tkinter-file-dialog-focus But then see if it works under MacOS. I fear it will not. Laura -- https://mail.python.org/mailman/listinfo/python-list

Re: askopenfilename()

2015-11-28 Thread Christian Gollwitzer
Am 28.11.15 um 13:48 schrieb Ulli Horlacher: Christian Gollwitzer 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

Re: askopenfilename()

2015-11-28 Thread Ulli Horlacher
Christian Gollwitzer wrote: > Am 28.11.15 um 11:29 schrieb Ulli Horlacher: > > One of my Windows test users reports, that the file dialog window of > > askopenfilename() starts behind the console window and has no focus. > > On Linux (XFCE) I do not have this problem. &g

Re: askopenfilename()

2015-11-28 Thread Christian Gollwitzer
Am 28.11.15 um 11:29 schrieb Ulli Horlacher: One of my Windows test users reports, that the file dialog window of askopenfilename() starts behind the console window and has no focus. On Linux (XFCE) I do not have this problem. I start it with: Tk().withdraw() file = askopenfilename(title

askopenfilename() (was: Re: non-blocking getkey?)

2015-11-28 Thread Ulli Horlacher
can call GetConsoleWindow [1] and then SetForegroundWindow [2]. > (...) > > great, this works! Thanks! One of my Windows test users reports, that the file dialog window of askopenfilename() starts behind the console window and has no focus. On Linux (XFCE) I do not have this problem. I start it w

Re: tkinter: get filename of askopenfilename

2009-06-25 Thread norseman
rom wrote: Thanks again. After your replies, I have understood how to do what I wanted. What I wanted to do is to get a value after clicking a button and use it in another part of the program. As you said, after getting the value, I have to store it in a global variable. However, the program does

Re: tkinter: get filename of askopenfilename

2009-06-25 Thread norseman
rom wrote: Ok. I think I got it. I have to do it in this way: ### import Tkinter import tkFileDialog filename='' root = Tkinter.Tk() Tkinter.Button(root, text='Notch genes...', command=lambda: open_file_dialog()).pack() def open_file_dialog(): global filename

Re: tkinter: get filename of askopenfilename

2009-06-25 Thread norseman
rom wrote: Thanks for your response. I have modified this minimal program as you suggested but still is not able to print the filename: ## import Tkinter import tkFileDialog global filename # NO NO NO! No global line here filename='' root = Tkinter.Tk() Tkinter.

Re: tkinter: get filename of askopenfilename

2009-06-25 Thread rom
Thanks again. After your replies, I have understood how to do what I wanted. What I wanted to do is to get a value after clicking a button and use it in another part of the program. As you said, after getting the value, I have to store it in a global variable. However, the program does not do anyth

Re: tkinter: get filename of askopenfilename

2009-06-25 Thread Sean McIlroy
i think what he means is to put the global declaration inside the function that assigns to filename: def open_file_dialog(): global filename filename = tkFileDialog.askopenfilename(filetypes= [("allfiles","*")]) as it was, the function was creating a new variable called filename and assi

Re: tkinter: get filename of askopenfilename

2009-06-24 Thread rom
Ok. I think I got it. I have to do it in this way: ### import Tkinter import tkFileDialog filename='' root = Tkinter.Tk() Tkinter.Button(root, text='Notch genes...', command=lambda: open_file_dialog()).pack() def open_file_dialog(): global filename filename = tk

Re: tkinter: get filename of askopenfilename

2009-06-24 Thread rom
Thanks for your response. I have modified this minimal program as you suggested but still is not able to print the filename: ## import Tkinter import tkFileDialog global filename filename='' root = Tkinter.Tk() Tkinter.Button(root, text='Notch genes...', command=lambda: open

Re: tkinter: get filename of askopenfilename

2009-06-24 Thread norseman
OOPS - I left out the global statement rom wrote: Hi there, I am writing an interface with Tkinter. My minimal program looks like this: # import Tkinter import tkFileDialog # define globals here filename= '' # will take care of the problem root = Tkinter.Tk() Tkinter.Butto

Re: tkinter: get filename of askopenfilename

2009-06-24 Thread norseman
rom wrote: Hi there, I am writing an interface with Tkinter. My minimal program looks like this: # import Tkinter import tkFileDialog # define globals here filename= '' # will take care of the problem root = Tkinter.Tk() Tkinter.Button(root, text='Notch genes...', command=la

tkinter: get filename of askopenfilename

2009-06-24 Thread rom
Hi there, I am writing an interface with Tkinter. My minimal program looks like this: # import Tkinter import tkFileDialog root = Tkinter.Tk() Tkinter.Button(root, text='Notch genes...', command=lambda: open_file_dialog()).pack() def open_file_dialog(): filename = tkFileDialog.a

Re: tkinter, askopenfilename, initial directory

2008-08-11 Thread Gabriel Genellina
En Thu, 07 Aug 2008 19:08:56 -0300, Lisa Frauens <[EMAIL PROTECTED]> escribi�: I see there is an initial directory option in askopenfilename. However, I want the initial directory to be the last directory used in a prior execution of my script. Is there a way to force the askopenfi

tkinter, askopenfilename, initial directory

2008-08-07 Thread Lisa Frauens
I see there is an initial directory option in askopenfilename. However, I want the initial directory to be the last directory used in a prior execution of my script. Is there a way to force the askopenfilename to the previous initial directory easily using information somewhere (I know

Re: askopenfilename() as root window

2007-12-18 Thread Sean DiZazzo
mply want a script to open a dialog and return the chosen file's > > path to stdout. > > Yes, create the root yourself so you can call the withdraw() method: > > root = Tk() > root.withdraw() > print askopenfilename() > > -- > Gabriel Genellina As usual... Thank you Gabriel. -- http://mail.python.org/mailman/listinfo/python-list

Re: askopenfilename() as root window

2007-12-18 Thread Gabriel Genellina
reate the root yourself so you can call the withdraw() method: root = Tk() root.withdraw() print askopenfilename() -- Gabriel Genellina -- http://mail.python.org/mailman/listinfo/python-list

askopenfilename() as root window

2007-12-18 Thread Sean DiZazzo
Is there any way to open a Tkinter.askopenfilename() without opening a root window alongside the file chooser? I simply want a script to open a dialog and return the chosen file's path to stdout. """ from tkFileDialog import askopenfilename print askopenfilename() "&q

Remote askopenfilename()

2007-01-02 Thread half . italian
Hi all. I'm trying to get Tkinter.askopenfilename() to list a directory tree on a remote computer. I've got some ideas, but nothing is slapping me in the face. Can someone point me in the right direction? ~Sean -- http://mail.python.org/mailman/listinfo/python-list