tkFileDialog Question

2016-03-02 Thread Wildman via Python-list
Is there a way to prevent the dialog from displaying hidden directories? My research has not found anything relating to hidden files or directories. -- GNU/Linux user #557453 "Philosophy is common sense with big words." -James Madison -- https://mail.python.org/mailman/listinfo/python-list

tkFileDialog Question

2011-03-16 Thread garyr
tkFileDialog.askdirectory() allows the selection of a directory. In my code it displays a line of text at the top of the frame ("Please choose a directory, then select OK"). A little below that the current path ("C:\Documents and Settings\Owner\My Documents\Python\...") is displayed as a string and

RE: tkFileDialog question

2009-11-16 Thread Matt Mitchell
Subject: Re: tkFileDialog question Matt, There is also a nice thing you need to know about Python if you already do not know. That is the fact that all empty collections bool to False. This makes Truth testing easier. >>> bool([]) False >>> bool('') False >>> bool(

Re: tkFileDialog question

2009-11-15 Thread r
Matt, There is also a nice thing you need to know about Python if you already do not know. That is the fact that all empty collections bool to False. This makes Truth testing easier. >>> bool([]) False >>> bool('') False >>> bool({}) False >>> bool([1]) True >>> bool([[]]) True >>> bool(' ') True

Re: tkFileDialog question

2009-11-15 Thread r
On Nov 15, 8:56 pm, "Gabriel Genellina" wrote: > En Fri, 13 Nov 2009 11:32:37 -0300, Matt Mitchell   > escribió: > > > answer = tkFileDialog.askdirectory() > > > if answer is not '': > >    #do stuff > > Although it "reads well", this is *wrong*. You want != here, not the `is   > not` operator. >

Re: tkFileDialog question

2009-11-15 Thread Gabriel Genellina
En Fri, 13 Nov 2009 11:32:37 -0300, Matt Mitchell escribió: answer = tkFileDialog.askdirectory() if answer is not '': #do stuff Although it "reads well", this is *wrong*. You want != here, not the `is not` operator. if answer != '': ... If you want to compare the *values* of t

Re: tkFileDialog question

2009-11-13 Thread r
Opps, i see you answered your own question ;-) To save you more hours of Googling take a look at these two sites! #great reference http://infohost.nmt.edu/tcc/help/pubs/tkinter/ #more in-depth http://effbot.org/tkinterbook/ you'll want to keep them both under your pillow. -- http://mail.python

Re: tkFileDialog question

2009-11-13 Thread r
-bounces+mmitchell=transparent@python.org] On > Behalf Of Matt Mitchell > Sent: Friday, November 13, 2009 9:33 AM > To: python-l...@python.org > Subject: tkFileDialog question > > Hi, > > This is my first attempt to write a script with any kind of gui.   All I > need the

RE: tkFileDialog question

2009-11-13 Thread Matt Mitchell
@python.org Subject: tkFileDialog question Hi, This is my first attempt to write a script with any kind of gui. All I need the script to do is ask the user for a directory and then do stuff with the files in that directory. I used tkFileDialog.askdirectory(). It works great but it pops up an empty tk

tkFileDialog question

2009-11-13 Thread Matt Mitchell
Hi, This is my first attempt to write a script with any kind of gui. All I need the script to do is ask the user for a directory and then do stuff with the files in that directory. I used tkFileDialog.askdirectory(). It works great but it pops up an empty tk window. Is there any way to prevent

Re: tkFileDialog question

2005-05-13 Thread jaime . suarez
James, thank you very much for your answer. Jaime -- http://mail.python.org/mailman/listinfo/python-list

Re: tkFileDialog question

2005-05-12 Thread James Stroud
Oops, That should have been, class MyApp: def __init__(self, parent): self.myParent = parent self.myContainer1 = Frame(parent) self.myContainer1.pack() self.entry = Entry(self.myContainer1) self.entry.grid(r

Re: tkFileDialog question

2005-05-12 Thread James Stroud
I think you are better off not binding a button like you are doing. Use the "command" option to get the behavior you want. E.g: class MyApp: def __init__(self, parent): self.myParent = parent self.myContainer1 = Frame(parent) self.myContainer

tkFileDialog question

2005-05-12 Thread jaime . suarez
I am creating a very simple GUI with one Entry widget and one Button. The purpose of the Button widget is to Browse for a file using tkFileDialog.askopenfilename(). I bind the button to a handler which spawns a tkFileDialog. This works but the button __stays depressed__ after the handler returns!