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.
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
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
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", "*
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
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
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.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
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(
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
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.
>
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
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
-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
@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
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
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
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()
> >&
"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
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
>>> 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"
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
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
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", "*.*
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
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
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
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
>
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
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
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
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
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();-)
use askopenfilename() instead of askopenfile()> > import tkFileDialog> file = tkFileDialog.askopenfile()> print file>
Access over 1 million songs - Yahoo! Music Unlimited.--
http://mail.pyt
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
> >
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
***
> 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
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
^
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'
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
Gheorghe Postelnicu wrote:
> -- Forwarded message --
> From: [EMAIL PROTECTED]
> To: python-list@python.org
> ****
> import tkFileDialog
> file = tkFileDialog.askopenfile()
> print file
> *
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.
> >
> >
> > **
[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
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
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
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
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
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
James, thank you very much for your answer.
Jaime
--
http://mail.python.org/mailman/listinfo/python-list
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
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
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
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
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/
54 matches
Mail list logo