Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!newsfeed.xs4all.nl!newsfeed1.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; 'syntax': 0.04; 'received:151': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'try:': 0.09; 'missed': 0.12; 'assume': 0.14; 'bracket': 0.16; 'emanuele': 0.16; 'path:': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'syntaxerror:': 0.16; 'pointed': 0.19; 'header:User-Agent:1': 0.23; 'error': 0.23; 'source': 0.25; 'header:X-Complaints-To:1': 0.27; 'related': 0.29; "doesn't": 0.30; 'skip:7 10': 0.31; 'writes:': 0.31; 'file': 0.32; 'subject:from': 0.34; 'subject: (': 0.35; 'something': 0.35; 'case,': 0.35; 'should': 0.36; 'list': 0.37; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'che': 0.60; 'ago,': 0.61; 'kind': 0.63; 'invalid': 0.68; '8bit%:100': 0.72; 'day': 0.76; 'ending': 0.78; 'quando': 0.84 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Lele Gaifax Subject: Re: Changing filenames from Greeklish => Greek (subprocess complain) Date: Thu, 06 Jun 2013 21:03:02 +0200 Organization: Nautilus Entertainments References: <2c425f2b-99de-4453-964e-c585f2043f71@googlegroups.com> <306a22ea-fbf7-4097-af31-121a999957d6@googlegroups.com> <9c482ba0-23ac-4e66-a0e1-a18be9fd82d8@googlegroup> <06a19483-65df-4fcd-9430-b45a01c9dbab@googlegroups.com> <51aed313$0$11118$c3e8da3@news.astraweb.com> <4c19b71d-4de5-41ad-b6ae-fb133a6c331e@googlegroups.com> <2be143c4-77c6-4c84-ba1c-46b02bd503ff@googlegroups.com> <1465c96b-c33e-4d5b-894e-b184c031a185@googlegroups.com> <808b7897-8ed4-4e0e-8976-4a22ae7f24cd@googlegroups.com> <332812d7-71b3-4bbb-a846-09827a6df65d@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Gmane-NNTP-Posting-Host: 151.62.123.251 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) Cancel-Lock: sha1:7970vr0d2ut+imdP+tWoIwfeajw= 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: 32 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1370545385 news.xs4all.nl 15957 [2001:888:2000:d::a6]:56552 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:47258 Νικόλαος Κούρας writes: > ... > # Load'em > for fullpath in path: > try: > ... > > The error is: > [Thu Jun 06 21:10:23 2013] [error] [client 79.103.41.173] File "files.py", line 64 > [Thu Jun 06 21:10:23 2013] [error] [client 79.103.41.173] for fullpath in path > [Thu Jun 06 21:10:23 2013] [error] [client 79.103.41.173] ^ > [Thu Jun 06 21:10:23 2013] [error] [client 79.103.41.173] SyntaxError: invalid syntax > > > Doesn't os.listdir( ...) returns a list with all filenames? You should *read* and *understand* the error message! This is the same kind of confusion you had when I pointed you at the missing closing bracket some day ago, when you missed the meaning of the error and assume it's source is related to something completely different... In the specific case, your line 64 is missing an ending colon (":"). ciao, lele. -- nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia. lele@metapensiero.it | -- Fortunato Depero, 1929.