Creating folder browse dialogue gui

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • crazywu
    New Member
    • Dec 2008
    • 1

    Creating folder browse dialogue gui

    I have completed a script which opens various txt files within a folder path and does calculations on them, currently being set for example:

    path = "./files"

    is there a simple solution to grab a folder path using a gui function similar to that of the browse for folder function in .net

    this will than set the path to what the user has chosen

    Thanks
  • ChrisWang
    New Member
    • Nov 2008
    • 9

    #2
    Hi,

    I think wxPython can help you to develop GUI function, including the input/output.

    You can use wx.TextCtrl to get the input from the user, and then use os.listdir('PAT H') to enumerate the files.
    Note: PATH is the input got from user.

    I can give you a sample to use wxPython
    wxpython TextCtrl Basic Formatting - Python

    and the help for TextCtrl
    wx.TextCtrl

    Comment

    Working...