Path: csiph.com!usenet.pasdenom.info!news.albasani.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.053 X-Spam-Evidence: '*H*': 0.90; '*S*': 0.00; 'charset:iso-8859-7': 0.04; 'url:unicode': 0.09; 'python': 0.11; "'rb')": 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'wrote:': 0.18; 'thu,': 0.19; 'skip:" 40': 0.26; 'this:': 0.26; 'header:In-Reply-To:1': 0.27; 'message-id:@mail.gmail.com': 0.30; 'though.': 0.31; 'says': 0.33; 'worked': 0.33; 'problem': 0.35; 'received:209.85': 0.35; 'received:209.85.220': 0.35; 'received:google.com': 0.35; 'subject:?': 0.36; 'wrong': 0.37; 'received:209': 0.37; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'quote': 0.39; 'to:addr:python.org': 0.39; 'read': 0.60; 'subject:. ': 0.67; 'dont': 0.67; 'mar': 0.68; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type:content-transfer-encoding; bh=jiCMU3O9Ry+SziZqHXF4gZx9FYuj6MxjgSEc0l7ZHbk=; b=bOcH8xr2qfcBkGC86UPmi3lVzt8bNUT4eKSK6r53tdCBX9NyVFbc4BlWDRNU2006md jrfjPEtsyf1JZTmPKeDeSfMKjd7X0Mx7KfyquddblewesVW+I2ZXm9HGIcusVt82pxBQ nBxNSO9zeOOPbAKr1IQWbL55MnHeiRxLlqNj+joQ39dCMKLJVd1yFbzpwUFUQk88Xxzw hMHKTBpa38NeCbm8azoPIqFK1oAgVMC8N38ooQpo/HG3zNGrmbhuaHfIaGtstqstEPwJ pKal+xaPNkGPqVAqeIxn2CQRmJjcQhO0W9eRLzB8HrCTwmFfAYRwwuShSg6Z6GaBHDDj aRPw== MIME-Version: 1.0 X-Received: by 10.220.103.7 with SMTP id i7mr25937878vco.7.1364443035734; Wed, 27 Mar 2013 20:57:15 -0700 (PDT) In-Reply-To: <07780f4e-62ec-430f-a0cf-fb551336ac18@googlegroups.com> References: <9c01c631-77e8-4104-ae1f-5cccfaaea10d@googlegroups.com> <22f50ec2-7d20-47af-a793-5cf801b6a23e@googlegroups.com> <515322EC.9080602@mrabarnett.plus.com> <64b1d68a-7cc2-4039-b550-7f4970442aec@googlegroups.com> <07780f4e-62ec-430f-a0cf-fb551336ac18@googlegroups.com> Date: Thu, 28 Mar 2013 14:57:15 +1100 Subject: Re: MySQLdbd error. Perhpas it isn't installed? From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-7 Content-Transfer-Encoding: quoted-printable 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: 24 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1364443039 news.xs4all.nl 6889 [2001:888:2000:d::a6]:42283 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:42082 On Thu, Mar 28, 2013 at 2:54 PM, =CD=DF=EA=EF=F2 =C3=EA=F133=EA wrote: > this worked > > quote =3D random.choice( list( open( "/home/nikos/www/data/private/quotes= .txt", 'rb') ) ) > > and also this > > f =3D open( "/home/nikos/www/" + page, 'rb' ) > > i dont know why python 3 needs 'rb' though. > > Now ima having problem with this: > > htmldata =3D htmldata % (quote, music) > > it says soemthign about wrong operand.... http://www.joelonsoftware.com/articles/Unicode.html Read it. ChrisA