Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!news.albasani.net!nuzba.szn.dk!pnx.dk!news.stack.nl!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.007 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'scripts': 0.03; '(at': 0.04; 'english,': 0.09; 'received:151': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'above)': 0.16; 'brackets,': 0.16; 'collections': 0.16; 'emanuele': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'syntaxerror:': 0.16; 'variable': 0.18; '(the': 0.22; '>>>': 0.22; 'import': 0.22; 'header:User-Agent:1': 0.23; 'lets': 0.24; 'skip:" 20': 0.27; 'header:X-Complaints-To:1': 0.27; 'waste': 0.30; 'code': 0.31; 'raised': 0.31; 'writes:': 0.31; 'open': 0.33; 'plain': 0.33; 'subject:from': 0.34; 'subject: (': 0.35; 'to:addr:python-list': 0.38; 'files': 0.38; 'ability': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'che': 0.60; 'hope': 0.61; 'times': 0.62; 'due': 0.66; 'close': 0.67; '8bit%:92': 0.71; '8bit%:100': 0.72; 'attention': 0.75; 'more:': 0.84; 'quando': 0.84; '2013': 0.98 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: Tue, 04 Jun 2013 21:31:20 +0200 Organization: Nautilus Entertainments References: <2c425f2b-99de-4453-964e-c585f2043f71@googlegroups.com> <8c16324f-da12-44ff-bf2f-4ae56f9127c0@googlegroups.com> <51ac3bd6$0$11118$c3e8da3@news.astraweb.com> <51ad1cdd$0$11118$c3e8da3@news.astraweb.com> <306a22ea-fbf7-4097-af31-121a999957d6@googlegroups.com> <06a19483-65df-4fcd-9430-b45a01c9dbab@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Gmane-NNTP-Posting-Host: 151.62.126.40 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) Cancel-Lock: sha1:bHqAtctD0gUa9L8Ia0sqg8C2Z5E= 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: 31 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1370374281 news.xs4all.nl 15971 [2001:888:2000:d::a6]:32923 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:46964 Νικόλαος Κούρας writes: > Τη Τρίτη, 4 Ιουνίου 2013 9:18:29 μ.μ. UTC+3, ο χρήστης Lele Gaifax έγραψε: >> Νικόλαος Κούρας writes: > >> >>> from collections import Counter >> >>> stmt = "cur.execute('''SELECT url FROM files WHERE url = %s''', ( fullpath, )" >> >>> chars_count = Counter(stmt) >> >>> print("Number of '(': %d" % chars_count['(']) >> >>> print("Number of ')': %d" % chars_count[')']) >> Number of '(': 2 >> Number of ')': 1 > > > Hello Lele, you have proven helpfull many times lets hope once more: With due respect, you need to *improve* your ability to *understand* what people answer to your questions, otherwise it is a double (at a minimum) waste of time. The code above was my (failed) attempt to focus your attention on why one of your scripts raised a SyntaxError: translating that code in plain english, that line (the "stmt" variable above) contains *two* open brackets, and *one* close bracket. 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.