Path: csiph.com!usenet.pasdenom.info!news.albasani.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!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.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'url:pypi': 0.03; 'elif': 0.04; 'output': 0.04; 'python3': 0.05; 'python': 0.09; '-1,': 0.09; 'supported.': 0.09; 'to:addr:comp.lang.python': 0.09; 'cc:addr:python-list': 0.10; 'subject:error': 0.11; 'template': 0.11; 'subject:python': 0.11; '2.7': 0.13; 'charset:iso-8859-7': 0.15; 'being,': 0.16; 'run.': 0.16; 'subject:when': 0.16; 'subprocess': 0.16; 'tried:': 0.16; 'wrote:': 0.17; 'thu,': 0.17; 'followed': 0.20; 'please?': 0.22; 'tells': 0.22; 'cc:2**0': 0.23; 'cc:no real name:2**0': 0.24; 'command': 0.24; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; 'header :User-Agent:1': 0.26; 'supported': 0.26; 'correct': 0.28; '+0100,': 0.29; 'maybe': 0.29; 'error': 0.30; 'url:python': 0.32; 'produced': 0.33; 'received:google.com': 0.34; 'skip:. 20': 0.35; 'received:209.85': 0.35; 'michael': 0.36; 'but': 0.36; 'url:org': 0.36; 'moment': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'skip:o 20': 0.38; 'advice': 0.39; 'help': 0.40; 'your': 0.60; 'back': 0.62; 'url:0': 0.67; '2013': 0.84; '\xcc\xe1\xf1\xf4\xdf\xef\xf5': 0.84; 'hassle': 0.91 X-Received: by 10.49.29.99 with SMTP id j3mr903163qeh.38.1362659158561; Thu, 07 Mar 2013 04:25:58 -0800 (PST) Newsgroups: comp.lang.python Date: Thu, 7 Mar 2013 04:25:58 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=94.68.107.188; posting-account=DYJQ-woAAACEPH85Au2BhUVfFTfSfVa4 References: <8e17232e-5b24-4040-9215-c4bd89f34fa2@googlegroups.com> <7bfe7117-d39d-48dc-9a6f-3d57484610a8@googlegroups.com> <213cf076-4163-44fd-a8b6-b25970da1bfa@googlegroups.com> User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-IP: 94.68.107.188 MIME-Version: 1.0 Subject: Re: An error when i switched from python v2.6.6 => v3.2.3 From: =?ISO-8859-7?B?zd/q7/Igw+rxMzPq?= To: comp.lang.python@googlegroups.com Content-Type: text/plain; charset=ISO-8859-7 Content-Transfer-Encoding: quoted-printable Cc: python-list@python.org 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: , Message-ID: Lines: 72 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1362690962 news.xs4all.nl 6841 [2001:888:2000:d::a6]:50607 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:40826 =D4=E7 =D0=DD=EC=F0=F4=E7, 7 =CC=E1=F1=F4=DF=EF=F5 2013 1:51:42 =EC.=EC. UT= C+2, =EF =F7=F1=DE=F3=F4=E7=F2 Michael Ross =DD=E3=F1=E1=F8=E5: > On Thu, 07 Mar 2013 12:27:03 +0100, =CD=DF=EA=EF=F2 =C3=EA=F133=EA =20 >=20 > wrote: >=20 >=20 >=20 > > =D4=E7 =D0=DD=EC=F0=F4=E7, 7 =CC=E1=F1=F4=DF=EF=F5 2013 11:06:27 =F0.= =EC. UTC+2, =EF =F7=F1=DE=F3=F4=E7=F2 =CD=DF=EA=EF=F2 =C3=EA=F133=EA =20 >=20 > > =DD=E3=F1=E1=F8=E5: >=20 > >> Any ideas about the error please? >=20 > >> >=20 > >> >=20 > >> >=20 > >> I can assure you all the statemnt are correct ebcause they work in =20 >=20 > >> python v2.6.6 >=20 > > >=20 > > can someone help this issue so my webiste will get back on working plz? >=20 >=20 >=20 > MySQLdb is python 2 only. >=20 > "MySQL-3.23 through 5.0 and Python-2.3 through 2.7 are currently =20 >=20 > supported. Python-3.0 will be supported in a future release." >=20 >=20 >=20 > Maybe try this one: >=20 > https://pypi.python.org/pypi/mysql-connector-python/1.0.9 >=20 >=20 >=20 > Alternatively, >=20 > forget about subprocess.check_output, >=20 > call your metrites.py with os.system('python metrites.py some-temp-file') >=20 > and have it write its output to some-temp-file, >=20 > and read some-temp-file back into your template? Yes its better for me to give upon python3 for the moment being, because al= l that hassle was for makeing the subprocess command run. Now i just followed your advice and tried: elif htmlpage.endswith('.py'): htmldata =3D os.system('/usr/bin/python ./metrites.py /data/files/htmltem= p') but produced error tells me that: template undefined, htmldata =3D -1, counter =3D '
...st.gr/?show=3Dstats"> 0 \n\t\t ' whay htmldata reeturn the value '-1' when os.sytem is executed?