Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #24955

tkFileDialogs

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 <brandon.harris@reelfx.com>
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 <brandon.harris@reelfx.com>
To "python-list@python.org" <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 <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.1849.1341552375.4697.python-list@python.org> (permalink)
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

Show key headers only | View raw


I'm wanting to allow users to select hidden directories in windows and it seems 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, asksaveasfilename, 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 possibly give me a solution to this hidden directory issue.  I have found that 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 have 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 = tkFileDialog.askdirectory(initialdir='%APPDATA%')
# Will start in and navigate to APPDATA
test = tkFileDialog.askopenfile(initialdir='%APPDATA%')

Thanks in advance for any help given!


Brandon L. Harris

Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

tkFileDialogs brandon harris <brandon.harris@reelfx.com> - 2012-07-06 05:22 +0000
  Re: tkFileDialogs Rick Johnson <rantingrickjohnson@gmail.com> - 2012-07-06 09:17 -0700

csiph-web