473,387 Members | 1,611 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

How to use the OS's native file selector in Tkinter

Hi,

I would like to use the native file selector of the "host OS" for the "Open
File" function of my Python/Tkinter app. Could anyone tell me how to do
this?
My primary target platform is Windows. So a Windows-only solution would be
ok (IIRC Linux doesn't even have a "native file selector").

copx
Sep 5 '05 #1
2 3033
tkFileDialog.Open is a wrapper around tk's tk_getOpenFile.

tk_getOpenFile uses the native dialog on Windows, via the GetOpenFileName()
win32 API call, at least in Tk versions 8.2 and newer.

Jeff

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQFDHGBWJd01MZaTXX0RAl+/AJ45KwyzhjSml7tMOa2sK80++rmlYACeOYdM
bTjh0Bly9ua7cpQFhZR1q1A=
=8WQe
-----END PGP SIGNATURE-----

Sep 5 '05 #2

<je****@unpythonic.net> schrieb im Newsbeitrag
news:ma*************************************@pytho n.org...

Thank you!
copx
Sep 5 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: David Stark | last post by:
I have Mac OS 10.2 which ships with python. I downloaded TclTkAqua from ActiveState and installed it. Then I get: >>> import Tkinter Traceback (most recent call last): File "<stdin>", line 1,...
2
by: Jerry | last post by:
Hi, I am (today!) starting to Python... I am runnin MacOS X 10.3.3 with: 1) "Batteries included" Aqua Tcl/Tk version 8.4.5 2) The 2.3 version of Python that comes with the OS 3) The...
4
by: Mike Tuller | last post by:
I recently purchased a book to learn python, and am at a part where I want to start working with GUIs. I have an OS X system, and am using the default python installed on the system. I have...
14
by: Kenneth McDonald | last post by:
At the moment I'm doing most of my stuff on a Mac, but I've been considering also getting a Windows laptop. One of the reasons is that I've found it very difficult to get certain Python related...
4
by: dmsbox2000-list1 | last post by:
I am running Mac OS X. I have Tcl/Tk installed. I can run the Aqua version (TkAqua) of wish by typing 'wish' at a terminal prompt. I can run the X11 version (TkX11) of wish by typing...
2
by: Andrew Trevorrow | last post by:
Our app uses embedded Python to allow users to run arbitrary scripts. Scripts that import Tkinter run fine on Windows, but on Mac OS X there is a serious problem. After a script does "root = Tk()"...
3
by: Thomas Ploch | last post by:
Hello folks, Since this is my first post on the list, a brief introduction of myself. My name is Thomas, I am 26 years old, I am a student of Computational Linguistics and I am a python...
4
by: njwilson23 | last post by:
I'm having trouble with tkinter on a new installation of Python (2.6), built with the framework option from source that was downloaded from python.org. I'm running OS 10.4 on a PowerPC G4. The...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.