Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.033 X-Spam-Evidence: '*H*': 0.93; '*S*': 0.00; 'subject:skip:t 10': 0.07; 'default)': 0.09; 'advance': 0.10; 'navigation': 0.16; 'windows': 0.19; 'code.': 0.20; 'issue.': 0.20; 'to:name:python- list@python.org': 0.20; 'import': 0.21; '(on': 0.22; 'example': 0.23; 'seems': 0.23; 'command': 0.24; 'common': 0.26; 'select': 0.26; 'possibly': 0.27; 'dialog': 0.29; 'class': 0.29; "i'm": 0.29; "skip:' 10": 0.30; 'that.': 0.30; 'folder': 0.30; 'file': 0.32; "skip:' 20": 0.32; 'anyone': 0.33; 'to:addr:python-list': 0.33; "can't": 0.34; 'thanks': 0.34; 'open': 0.35; "won't": 0.35; 'really': 0.36; 'test': 0.36; 'skip:t 40': 0.37; 'two': 0.37; 'why': 0.37; 'received:209': 0.37; 'supports': 0.38; 'to:addr:python.org': 0.39; 'help': 0.40; 'different': 0.63; 'wanting': 0.65; 'folders.': 0.84; 'navigate': 0.91 From: brandon harris To: "python-list@python.org" Subject: tkFileDialogs Thread-Topic: tkFileDialogs Thread-Index: Ac1bNgRDqGMYkHjdSZS5Ev7b3tQ2lw== Date: Fri, 6 Jul 2012 05:22:44 +0000 Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [76.185.48.9] Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 27 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1341552375 news.xs4all.nl 6934 [2001:888:2000:d::a6]:40592 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:24955 I'm wanting to allow users to select hidden directories in windows and it s= eems that using the tkFileDialog.askdirectory() won't allow for that. It's= using the tkFileDialog.Directory class which calls an internal command 'tk= _chooseDirectory' . However the file selector dialogs (askopenfilename, as= ksaveasfilename, etc) has the common windows dialog which supports showing = hidden folders. It's using the tkFileDialog.Open class which is calling an= internal command of 'tk_getOpenFile'. Can anyone shed light on why these two dialogs are so very different and po= ssibly give me a solution to this hidden directory issue. I have found tha= t you can't really use the Open class because it's going to require a file = be selected, not a directory and the Directory class won't navigate to or h= ave an initialdir that is hidden (on windows the %APPDAT% folder is hidden = by default) Windows Example Code. import tkFileDialog # Won't start in or allow navigation to APPDATA test =3D tkFileDialog.askdirectory(initialdir=3D'%APPDATA%') # Will start in and navigate to APPDATA test =3D tkFileDialog.askopenfile(initialdir=3D'%APPDATA%') Thanks in advance for any help given! Brandon L. Harris