473,396 Members | 1,987 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,396 software developers and data experts.

file open dialog box

hi
i am trying to get the file open dilog box such to choose the file from system(my computer) and after that i need to print the complete path of the selected file
i tried with sample applications allready posted but i con't get the dialog box itself
how to achive this task
i am implementing this in Activegrid
reply me ASAP
Feb 8 '08 #1
1 14046
dazzler
75
I have no idea what's activegrid, can you use any python GUIs?

well anyway here's one example with tkinter...

Expand|Select|Wrap|Line Numbers
  1. from Tkinter import *
  2. import tkFileDialog
  3.  
  4.  
  5. master = Tk()
  6. master.withdraw() #hiding tkinter window
  7.  
  8. file_path = tkFileDialog.askopenfilename(title="Open file", filetypes=[("txt file",".txt"),("All files",".*")])
  9.  
  10. if file_path != "":
  11.    print "you chose file with path:", file_path
  12.  
  13. else:
  14.    print "you didn't open anything!"
  15.  
  16. master.quit()
  17.  
Feb 12 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Alok Joshi | last post by:
I am trying to code the functionality of a file open dialog box in Access 97 using VBA. I tried following Microsoft KB article 96114 but when I run it in Access 97 I get the message commdlg.dll...
2
by: Jim | last post by:
I am trying to import a file using a file spec from the Access File Open dialog... I have been out to http://www.mvps.org/access/api/api0001.htm to look at the code, but because I'm not a guru, I...
2
by: Lonnie | last post by:
I need to implement a simple file open dialog in my form application (C++ .NET). I know there has to be a canned version of this dialog somewhere that I can simply use, but where? How? All the...
5
by: Krishna | last post by:
Hi I want to open the file open dialog box when i click the asp.net button and when i select the particular folder, i want full path in the textbox besides it is there anyway we can accomplish...
3
by: JoNaS | last post by:
As a lot of us might now, the input file (aka browse button) in html does not allow for multiple file selection or for filtering file types. The File Open dialog used in WinForms allow these things...
0
by: John Clark | last post by:
Hi, I am using webbrowser control to automate a site. this site contains form with tage <INPUT TYPE=FILE ...> I know the control is not writeable. So, only thing that I could do was: ...
5
by: charles | last post by:
I have a question about the file Open dialog box. I would like to be able to make the dialog box bigger by selecting the bottom right-hand corner and dragging/expanding the box. I am told by...
1
by: jhaek19 | last post by:
HI, how can show the file open dialog box... i dont want to use the <input = "file"> object, i suggest a different style...
1
by: ahammad | last post by:
Hello, I need to customize a standard File Open dialog box so that when DoModal is called, the dialog box opens to a certain directory and already has preselected a file. ...
2
by: aine_canby | last post by:
Hi, I want to open a file seach dialog from within my python script which I run from within PythonWin. I also have the wxPython package installed. How might I do this? Thanks,
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.