Re: [newbie] tkFileDialog does not show title

2016-03-28 Thread jenswaelkens
Op dinsdag 29 maart 2016 00:29:29 UTC+2 schreef Peter Pearson: > On Mon, 28 Mar 2016 14:10:28 -0700 (PDT), jenswaelk...@gmail.com wrote: > > I'm using the tkFileDialog-module in Python 2.7, it works fine except > > for one thing: when I add a title, the title isn't shown.

Re: [newbie] tkFileDialog does not show title

2016-03-28 Thread Peter Pearson
On Mon, 28 Mar 2016 14:10:28 -0700 (PDT), jenswaelk...@gmail.com wrote: > I'm using the tkFileDialog-module in Python 2.7, it works fine except > for one thing: when I add a title, the title isn't shown. > > e.g. I have this line of code: > inputfilename=tkF

Re: [newbie] tkFileDialog does not show title

2016-03-28 Thread Wildman via Python-list
On Mon, 28 Mar 2016 14:10:28 -0700, jenswaelkens wrote: > I'm using the tkFileDialog-module in Python 2.7, it works fine except for one > thing: when I add a title, the title isn't shown. > > e.g. I have this line of code: > inputfilename=tkFileDialog.askopenfilena

[newbie] tkFileDialog does not show title

2016-03-28 Thread jenswaelkens
I'm using the tkFileDialog-module in Python 2.7, it works fine except for one thing: when I add a title, the title isn't shown. e.g. I have this line of code: inputfilename=tkFileDialog.askopenfilename(defaultextension=".dat", filetypes=(("data file", "*

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

Re: Multiple file select with tkFileDialog passes back 'decorated' strings (sometimes)

2011-05-23 Thread Gabriel Genellina
En Mon, 23 May 2011 10:00:53 -0300, Alex van der Spek escribió: I switched from Mark Hammonds pywin32 extensions for file choosers as the multiselect there seems to crash on me when selecting more than a few dozen. Using Tk now. Works well but the resulting string passed back seems to 'dec

Multiple file select with tkFileDialog passes back 'decorated' strings (sometimes)

2011-05-23 Thread Alex van der Spek
possibilities? Is it the same across platforms (I use Python 2.7 on Win Vista)? See code below. Thanks for the insight! Alex van der Spek +++ from Tkinter import * import tkFileDialog as tkf tkroot=Tk() tkroot.withdraw() initdir=os.environ['HOME'] filetype=[(

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
prevent the empty tk window from popping up? Here's the code: import tkFileDialog answer = tkFileDialog.askdirectory() if answer is not '': #do stuff Thanks! Matt -- http://mail.python.org/mailman/listinfo/python-list

Re: DVCSs wreck tkFileDialog

2009-04-14 Thread Alan G Isaac
More info: http://sourceforge.net/mailarchive/forum.php?thread_name=A46CBF978138744AAC019E6FF055EAB70F30AE%40apatlelsmail08.elsys.gtri.org&forum_name=tortoisehg-develop> Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: tkFileDialog -> ImportError: No module named shell

2009-04-13 Thread Mike Driscoll
2008, 15:10:54) [MSC > >> v.1310 32 bit (Intel)] on win32 Type "help", "copyright", > >> "credits" or "license" for more information. > >>  >>> import Tkinter as tk > >>  >>> root=tk.Tk() > >&

Re: tkFileDialog -> ImportError: No module named shell

2009-04-13 Thread Alan G Isaac
"license" for more information. >>> import Tkinter as tk >>> root=tk.Tk() >>> import tkFileDialog >>> fh = tkFileDialog.asksaveasfile() Traceback (most recent call last): File "boot_com_servers.py", line 44, in File "tbzr.pyo&q

Re: tkFileDialog -> ImportError: No module named shell

2009-04-13 Thread Mike Driscoll
right", "credits" or "license" for more information. >  >>> import Tkinter as tk >  >>> root=tk.Tk() >  >>> import tkFileDialog >  >>> fh = tkFileDialog.asksaveasfile() > Traceback (most recent call last): >    File "b

tkFileDialog -> ImportError: No module named shell

2009-04-13 Thread Alan G Isaac
>>> import Tkinter as tk >>> root=tk.Tk() >>> import tkFileDialog >>> fh = tkFileDialog.asksaveasfile() Traceback (most recent call last): File "boot_com_servers.py", line 44, in File "tbzr.pyo", line 125, in File "tbzr.pyo"

Re: Tkinter, tkFileDialog - how to select multiple files ?

2009-04-07 Thread Steve Offutt
Hmm ... sorry folks - this works for me everywhere except on the machine I wrote it on ... Must be some sort of configuration problem... Steve -- http://mail.python.org/mailman/listinfo/python-list

Tkinter, tkFileDialog - how to select multiple files ?

2009-04-07 Thread Steve Offutt
Let me preface by saying that I don't do much Python, however, I am in my spare time, attempting to become somewhat comfortable with Python/ Tkinter. I just can't seem to understand what is the problem with this: -- import Tkinter, tkFileDialog root = Tkinter.T

Re: tkFileDialog, askopenfiles in v2.6 question

2008-11-26 Thread MRAB
fransstil wrote: To select a group of files works fine in 2.5 ... from tkFileDialog import askopenfiles fnames = askopenfiles(title = "Select files", initialdir = "C:\\temp", filetypes=[("All", "*.*

tkFileDialog, askopenfiles in v2.6 question

2008-11-26 Thread fransstil
To select a group of files works fine in 2.5 ... from tkFileDialog import askopenfiles fnames = askopenfiles(title = "Select files", initialdir = "C:\\temp", filetypes=[("All", "*.*")]) for i

Tkinter Entry blocked by tkFileDialog

2008-10-02 Thread Leonhard Vogt
choose a config file which controls the number and type of widgets I create. Regards Leonhard import Tkinter import tkFileDialog tk = Tkinter.Tk() tkFileDialog.askopenfilename() Tkinter.Entry(tk).grid() Tkinter.Button(tk, text='ask', command=tkFileDialog.askopenfilename).grid() t

tkFileDialog and locale under Linux

2008-09-23 Thread Matthias Huening
Hi, I have problems using tkFileDialog under Linux (Ubuntu 8.04 in my case, but other Linuxes seem to show the same behaviour). The following works fine: import tkFileDialog f = tkFileDialog.askopenfilename() No problem, I can chose a filename. But when switching the locale (in my case to

Re: tkFileDialog closes main application

2006-12-22 Thread Eric Brunel
On Thu, 21 Dec 2006 22:37:37 +0100, James Stroud <[EMAIL PROTECTED]> wrote: > Eric Brunel wrote: >> BTW, why do you create a sub-class of Frame for your application? Why >> not create a sub-class of Tk instead? >> > > The short answer is that inhereting from Frame will allow embedding of >

Re: tkFileDialog closes main application

2006-12-21 Thread mdmdmd
hanks again for your response. Eric Brunel wrote: > On Wed, 20 Dec 2006 18:37:10 +0100, mdmdmd <[EMAIL PROTECTED]> wrote: > >> Hello, >> >> I wish to collect 4 files from a user. So I have decided to use >> tkFileDialog askopenfilename. My problem is

Re: tkFileDialog closes main application

2006-12-21 Thread James Stroud
Eric Brunel wrote: > BTW, why do you create a sub-class of Frame for your application? Why > not create a sub-class of Tk instead? > The short answer is that inhereting from Frame will allow embedding of the application in another application. A Tk() can not be embedded like this. Tk is appro

Re: tkFileDialog closes main application

2006-12-21 Thread Eric Brunel
On Wed, 20 Dec 2006 18:37:10 +0100, mdmdmd <[EMAIL PROTECTED]> wrote: > Hello, > > I wish to collect 4 files from a user. So I have decided to use > tkFileDialog askopenfilename. My problem is that after a few file > selections the root window is destroyed (t

tkFileDialog closes main application

2006-12-20 Thread mdmdmd
Hello, I wish to collect 4 files from a user. So I have decided to use tkFileDialog askopenfilename. My problem is that after a few file selections the root window is destroyed (the whole program just dissappears) I have created a simple example and was able to reproduce the same thing with

Re: Problem getting a file pathname with tkFileDialog

2006-11-09 Thread Neil Cerutti
On 2006-11-09, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > you could also use encode("iso-8859-1") to nterpret just the > printed name such as: print myfilename.encode("iso-8859-1") > > and by the way if you wanted the file NAME you could have used > openfilename() instead of openfile();-)

Re: tkFileDialog

2006-11-09 Thread Mohammad Tayseer
use askopenfilename() instead of askopenfile()> > import tkFileDialog> file = tkFileDialog.askopenfile()> print file> Access over 1 million songs - Yahoo! Music Unlimited.-- http://mail.pyt

Re: Problem getting a file pathname with tkFileDialog

2006-11-09 Thread jmdeschamps
Tim Daneliuk wrote: > Sefyroth wrote: > > Thanks, > > > > but I get this error when I try this. > > > > UnicodeEncodeError: 'ascii' codec can't encode character u'\xe8' in > > position 12: ordinal not in range(128) > > > > I had encountered it with the askdirectory method as well. Is there an > >

Re: Problem getting a file pathname with tkFileDialog

2006-11-09 Thread Eric Brunel
On Wed, 08 Nov 2006 21:59:38 +0100, Tim Daneliuk <[EMAIL PROTECTED]> wrote: > Sefyroth wrote: >> Thanks, >> but I get this error when I try this. >> UnicodeEncodeError: 'ascii' codec can't encode character u'\xe8' in >> position 12: ordinal not in range(128) >> I had encountered it with the

Re: Problem getting a file pathname with tkFileDialog

2006-11-09 Thread Eric Brunel
*** > import tkFileDialog > file = tkFileDialog.askopenfile() > print file > > > > It prints the opened files stuff, but I just can not find how to get > that path as a string. I've searched around google an

Re: Problem getting a file pathname with tkFileDialog

2006-11-08 Thread Tim Daneliuk
Sefyroth wrote: > Thank you!!! I have had problems with other stuff because of this > (mainly py2exe!) > > It did the job! I thank you a lot. My pleasure. > > Just wondering though, > > D:/Travaux/5ème session/B51 - Dev. de ^ > Systèmes/Workspace/LMAOSoft/Controleur.py ^

Re: Problem getting a file pathname with tkFileDialog

2006-11-08 Thread Sefyroth
Thank you!!! I have had problems with other stuff because of this (mainly py2exe!) It did the job! I thank you a lot. Just wondering though, D:/Travaux/5ème session/B51 - Dev. de Systèmes/Workspace/LMAOSoft/Controleur.py That's my filepath, what is not ASCII in there? è Just checked and it'

Re: Problem getting a file pathname with tkFileDialog

2006-11-08 Thread Tim Daneliuk
Sefyroth wrote: > Thanks, > > but I get this error when I try this. > > UnicodeEncodeError: 'ascii' codec can't encode character u'\xe8' in > position 12: ordinal not in range(128) > > I had encountered it with the askdirectory method as well. Is there an > easy way to bypass this? > > Thanks

Re: tkFileDialog

2006-11-08 Thread James Stroud
Gheorghe Postelnicu wrote: > -- Forwarded message -- > From: [EMAIL PROTECTED] > To: python-list@python.org > **** > import tkFileDialog > file = tkFileDialog.askopenfile() > print file > *

Re: Problem getting a file pathname with tkFileDialog

2006-11-08 Thread Sefyroth
Daneliuk wrote: > [EMAIL PROTECTED] wrote: > > Hello, > > I am working on a school project that requires me to get the path of a > > filename for future treatment. > > I've tried getting a file with tkFileDialog.askopenfile. > > > > > > **

Re: Problem getting a file pathname with tkFileDialog

2006-11-08 Thread Tim Daneliuk
[EMAIL PROTECTED] wrote: > Hello, > I am working on a school project that requires me to get the path of a > filename for future treatment. > I've tried getting a file with tkFileDialog.askopenfile. > > > &g

tkFileDialog

2006-11-08 Thread Gheorghe Postelnicu
In our example, try replacing the last line with print file.name -- Forwarded message -- From: [EMAIL PROTECTED] To: python-list@python.org Date: 8 Nov 2006 11:01:08 -0800 Subject: Problem getting a file pathname with tkFileDialog Hello, I am working on a school project that

Problem getting a file pathname with tkFileDialog

2006-11-08 Thread cdroulers
Hello, I am working on a school project that requires me to get the path of a filename for future treatment. I've tried getting a file with tkFileDialog.askopenfile. import tkFileDialog file = tkFileDialog.askopenfile() print

FTPUTIL WITH TKFILEDIALOG

2006-06-24 Thread veki
HI,ALL I am new ftputil user and I need help about something: my prog: >>> import tkFileDialog >>> import ftputil >>> name=tkFileDialog.askopenfile() >>>ftp=ftputil.FTPHost() #Please when you want try this prog use your ftp server >>> nesto1=name.na

Re: How to make tkFileDialog GUI larger?

2005-11-28 Thread Martin Franklin
John Wheez wrote: > Hi all, > > I'm using teh tkFileDialog to let teh user select a directory. We have > long names which make > it difficult to view the directories. > > For some reason the GUI windows doesn;t expand on Windows like it does > on OS X or Linux. &g

How to make tkFileDialog GUI larger?

2005-11-27 Thread John Wheez
Hi all, I'm using teh tkFileDialog to let teh user select a directory. We have long names which make it difficult to view the directories. For some reason the GUI windows doesn;t expand on Windows like it does on OS X or Linux. Is there a method to make the widths of the tkFileDialog wi

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
on 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! > Any ideas why? > > class MyApp: > def __init__(sel

Re: tkFileDialog question

2005-05-12 Thread James Stroud
wrote: > 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 de

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

Re: How to I access the filename with TkFileDialog?

2005-02-17 Thread Vincent Wehren
imphasing wrote: I'm writing a python program to open a file, and display it onscreen, but I can't seem to find the var that "tkOpenFileName" returns to. It's not much use if you can't get the filename you just chose, so there must be a way to get it. Could anyone help me? Thanks, Alex openfilename

How to I access the filename with TkFileDialog?

2005-02-17 Thread imphasing
I'm writing a python program to open a file, and display it onscreen, but I can't seem to find the var that "tkOpenFileName" returns to. It's not much use if you can't get the filename you just chose, so there must be a way to get it. Could anyone help me? Thanks, Alex -- http://mail.python.org/