Path: csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed3.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.006 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'output': 0.05; 'attribute': 0.07; 'advice.': 0.09; 'builtin': 0.09; 'code"': 0.09; 'line:': 0.09; 'mixed': 0.09; 'override': 0.09; 'subject:using': 0.09; 'variables.': 0.09; 'python': 0.11; 'gui': 0.12; 'jan': 0.12; 'question.': 0.14; 'windows': 0.15; '1.3.0': 0.16; '3.3,': 0.16; 'created.': 0.16; 'diagnostic': 0.16; 'escribi\xf3:': 0.16; 'mayo': 0.16; 'reedy': 0.16; 'thread,': 0.16; 'wrote:': 0.18; 'library': 0.18; 'variable': 0.18; 'trying': 0.19; 'file,': 0.19; 'thanks.': 0.20; '>>>': 0.22; 'header:User- Agent:1': 0.23; 'error': 0.23; 'library,': 0.24; 'url:moin': 0.24; 'file.': 0.24; 'environment': 0.24; 'question': 0.24; 'source': 0.25; 'least': 0.26; 'read,': 0.26; 'asking': 0.27; 'defined': 0.27; 'header:In-Reply-To:1': 0.27; 'especially': 0.30; 'included': 0.31; 'code': 0.31; 'posting': 0.31; 'that.': 0.31; 'url:wiki': 0.31; 'about.': 0.31; 'helpful.': 0.31; 'prints': 0.31; 'file': 0.32; 'figure': 0.32; 'quite': 0.32; 'url:python': 0.33; 'running': 0.33; 'actual': 0.34; 'moment': 0.34; 'there,': 0.34; 'maybe': 0.34; 'something': 0.35; 'case,': 0.35; 'but': 0.35; 'in.': 0.36; 'leads': 0.36; 'representing': 0.36; 'method': 0.36; 'thanks': 0.36; 'url:org': 0.36; 'so,': 0.37; 'being': 0.38; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'rather': 0.38; 'anything': 0.39; 'bad': 0.39; 'to:addr:python.org': 0.39; 'enough': 0.39; 'called': 0.40; 'how': 0.40; 'skip:u 10': 0.60; 'most': 0.60; "you're": 0.61; 'first': 0.61; 'back': 0.62; 'email addr:gmail.com': 0.63; 'show': 0.63; 'such': 0.63; 'teach': 0.65; 'here': 0.66; 'response.': 0.68; 'answer.': 0.68; 'hints': 0.68; 'line,': 0.68; 'lose': 0.68; 'received:74.208': 0.68; 'subject:Get': 0.68; 'handing': 0.84; 'presumably': 0.84; 'received:74.208.4.194': 0.84; 'responses': 0.93; 'unsolicited': 0.95; '2013': 0.98 Date: Wed, 08 May 2013 18:52:48 -0400 From: Dave Angel User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130329 Thunderbird/17.0.5 MIME-Version: 1.0 To: python-list@python.org Subject: Re: Get filename using filefialog.askfilename References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Provags-ID: V02:K0:idxeZAolZ2lvL1s+b0mgs/N5ySQJPudvNccxdsC+T9f MrXT3zXEByo7cBbxsKnsP+ALDCV6NYMFQLj9C0ul5M09R9LWnI V0oqHMpX9XSGVpJtYmIamfYy4ev6Hf7u0d0ovN79GTSeCy4MPn SGYShWBhwsZpuyt9kPkzYAVCFpy1F3EVZajIRQ0YsoqqMj2F8N wRIDx0FeI4oPoBDYiDyi5znoeT6KzFD2yem4XSoOmrNuy7/Gfb P0efYQE3JWZo2+Svr1Oymb1xX+0ahWZbL1W5GsWQcAHekvaXzW mAAeSA+z7DUcgsH8o6dVecraqDY0siHy6DVX5KsXuI6yXjerw= = X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 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: 63 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1368053587 news.xs4all.nl 15865 [2001:888:2000:d::a6]:42139 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:44972 On 05/08/2013 04:14 PM, cheirasacan@gmail.com wrote: > El martes, 7 de mayo de 2013 23:53:32 UTC+2, Terry Jan Reedy escribió: >> On 5/7/2013 4:27 PM, cheirasacan@gmail.com wrote: >> >> >> >>> > > Yeah. This is an answer. A lot of thanks. > For a moment there, I thought you were being sarcastic, and ungrateful at that. But I figured that it must have been my imagination. Usually, it's better to teach a man to fish, rather than just handing him one. But some would rather just have an answer, but not the understanding of how to acquire it. So, some unsolicited advice. And mixed in, maybe the actual answer to your original question. 1) Lose googlegroups, or figure a way to avoid its bad habits. Your responses here are doublespaced, which makes it hard to read, especially when you include so much that has nothing to do with your response. Also, triple posting leads to a number of problems, not the least of which is the number of other responders who killfile anything from googlegroups. See http://wiki.python.org/moin/GoogleGroupsPython. 2) Include enough of your code that people can actually figure out what you're up to. You're asking a question about a method of an object filedialog, but you never show how it's created. 3) Include enough of your error messages or diagnostic prints that we can see what's going on. > output is: <......name="file.doc"...mode=......encoding.......... > You elided the only important part of that line, the type of the object you're asking about. Most of us would know that a file object has an attribute of name. But instead I spent quite a while trying to find what GUI library you were using that might be handing back something representing a file. 4) include the environment you're running in. In your first thread, you included a line: Using Windows 7, Python 3.3, sfml 1.3.0 library, ... Very helpful. But no such hints here. 5) try not to override builtin names with your own local variables. In this case, you defined a local variable called file, which overwrites, presumably by coincidence, its own type name. Thanks for pointing out the "annotated source code" on fossies.org. I wasn't aware of that location. -- DaveA