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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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.
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
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
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
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
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
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
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
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
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
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
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
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
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
30 matches
Mail list logo