vfwlupcyftx

2012-08-15 Thread Bounced mail
The original message was received at Thu, 16 Aug 2012 09:14:53 +0300 from python.org [95.83.175.119] - The following addresses had permanent fatal errors - ÿþSmall Business Server has removed potentially unsafe e-mail atta

Re: SSLSocket.getpeercert() doesn't return issuer, serial number, etc

2012-08-15 Thread Dieter Maurer
Gustavo Baratto writes: > SSL.Socket.getpeercert() doesn't return essential information present in the > client certificate (issuer, serial number, not before, etc), and it looks it > is by design: > > > > http://docs.python.org/library/ssl.html#ssl.SSLSocket.getpeercert > > http://hg.python.org/

Re: python+libxml2+scrapy AttributeError: 'module' object has no attribute 'HTML_PARSE_RECOVER'

2012-08-15 Thread Dieter Maurer
Dmitry Arsentiev writes: > Has anybody already meet the problem like this? - > AttributeError: 'module' object has no attribute 'HTML_PARSE_RECOVER' > > When I run scrapy, I get > > File "/usr/local/lib/python2.7/site-packages/scrapy/selector/factories.py", > line 14, in > libxml2.HTML_PAR

Re: [OT] Posting under ones full name

2012-08-15 Thread Dan Sommers
On 2012-08-15 at 13:59:53 +, Grant Edwards wrote: > On 2012-08-15, Chris Angelico wrote: > > Perhaps you said "Please use `m4-style quotes rather than matching > > ASCII quotes' or `something else' to indicate omission instead". When I've got these antlers on I am dictating and when I take

Re: email with a non-ascii charset in Python3 ?

2012-08-15 Thread Ben Finney
Steven D'Aprano writes: > On Wed, 15 Aug 2012 17:57:47 +0100, MRAB wrote: > > >> #!/usr/bin/python3 > >> #_*_ coding: latin1 _*_ > >> > > Aw well as the other replies, the "coding" line should be: > > > > #-*- coding: latin1 -*- > > I don't believe that actually matters to Python. It may matter

Re: dbf.py API question concerning Index.index_search()

2012-08-15 Thread MRAB
On 16/08/2012 02:22, Ethan Furman wrote: Steven D'Aprano wrote: On Wed, 15 Aug 2012 16:26:09 -0700, Ethan Furman wrote: Indexes have a new method (rebirth of an old one, really): .index_search( match, start=None, stop=None, nearest=False, partial=False ) [...

Re: dbf.py API question concerning Index.index_search()

2012-08-15 Thread MRAB
On 16/08/2012 01:28, Tim Chase wrote: On 08/15/12 19:21, Ethan Furman wrote: The well-hidden clue was this line: nearest returns where the match should be instead of raising an error And my question should have been: What should the return value be when nearest == True? Ah, well that's s

SSLSocket.getpeercert() doesn't return issuer, serial number, etc

2012-08-15 Thread Gustavo Baratto
Hello there, SSL.Socket.getpeercert() doesn't return essential information present in the client certificate (issuer, serial number, not before, etc), and it looks it is by design: http://docs.python.org/library/ssl.html#ssl.SSLSocket.getpeercert http://hg.python.org/cpython/file/b878df1d23b1/Mod

Re: _mysql_exceptions.OperationalError: (2005, "Unknown MySQL server host

2012-08-15 Thread nepaul
在 2012年8月16日星期四UTC+8上午12时58分07秒,Dennis Lee Bieber写道: > On Wed, 15 Aug 2012 17:22:49 +0200, Alain Ketterlin > > declaimed the following in > > gmane.comp.python.general: > > > > > Hans Mulder writes: > > > > Right! > > > On 15/08/12 15:30:26, nepaul wrote: > > > >> The code: > > > >> imp

Re: dbf.py API question concerning Index.index_search()

2012-08-15 Thread Ethan Furman
Steven D'Aprano wrote: On Wed, 15 Aug 2012 16:26:09 -0700, Ethan Furman wrote: Indexes have a new method (rebirth of an old one, really): .index_search( match, start=None, stop=None, nearest=False, partial=False ) [...] Why "index_search" rather than just "se

Re: OT: Monty Python in Syria

2012-08-15 Thread Andrew Cooper
On 16/08/2012 01:52, Andrew Cooper wrote: > On 16/08/2012 01:01, Terry Reedy wrote: >> On 8/15/2012 6:07 PM, Mark Lawrence wrote: >>> On 15/08/2012 20:15, Tamer Higazi wrote: Exactly! NOT PROGRAMMING related has NOTHING TODO HERE! >>> >>> Please don't shout, please don't top post >>

Re: OT: Monty Python in Syria

2012-08-15 Thread Andrew Cooper
On 16/08/2012 01:01, Terry Reedy wrote: > On 8/15/2012 6:07 PM, Mark Lawrence wrote: >> On 15/08/2012 20:15, Tamer Higazi wrote: >>> Exactly! >>> NOT PROGRAMMING related has NOTHING TODO HERE! >>> >> >> Please don't shout, please don't top post > > agreed. > >> and what gives you the right >> to

Re: dbf.py API question concerning Index.index_search()

2012-08-15 Thread Steven D'Aprano
On Wed, 15 Aug 2012 16:26:09 -0700, Ethan Furman wrote: > Indexes have a new method (rebirth of an old one, really): > >.index_search( > match, > start=None, > stop=None, > nearest=False, > partial=False ) [...] Why "index_search" rather than just "search"? >

Re: lambda in list comprehension acting funny

2012-08-15 Thread Robert Miles
On 7/11/2012 11:39 PM, Dennis Lee Bieber wrote: On 12 Jul 2012 03:53:03 GMT, Steven D'Aprano declaimed the following in gmane.comp.python.general: "ALU class"? Googling gives me no clue. Arithmetic/Logic Unit http://en.wikipedia.org/wiki/Arithmetic_logic_unit http://en.wikipedia.o

Re: dbf.py API question concerning Index.index_search()

2012-08-15 Thread Tim Chase
On 08/15/12 19:21, Ethan Furman wrote: > The well-hidden clue was this line: > > nearest returns where the match should be instead of raising an error > > And my question should have been: > >What should the return value be when nearest == True? Ah, well that's somewhat clearer. Return the

Re: A difficulty with lists

2012-08-15 Thread Terry Reedy
On 8/15/2012 5:58 PM, Rob Day wrote: > Madison May wrote: The list nlist inside of function xx is not the same as the variable u outside of the function: nlist and u refer to two separate list objects. When you modify nlist, you are not modifying u.

Re: Dynamically determine base classes on instantiation

2012-08-15 Thread Steven D'Aprano
On Wed, 15 Aug 2012 23:17:41 +0200, Thomas Bach wrote: > Hi list, > > I'm confronted with a strang problem I cannot find a clean solution for. > I want a class that determines on instantiating its base classes > dynamically. Consider the following two use cases Some comments: 1) What you show a

Re: dbf.py API question concerning Index.index_search()

2012-08-15 Thread Ethan Furman
Tim Chase wrote: On 08/15/12 18:26, Ethan Furman wrote: .index_search( match, start=None, stop=None, nearest=False, partial=False ) The defaults are to search the entire index for exact matches and raise NotFoundError if it can't find anything. The question is

Re: OT: Monty Python in Syria

2012-08-15 Thread Terry Reedy
On 8/15/2012 6:07 PM, Mark Lawrence wrote: On 15/08/2012 20:15, Tamer Higazi wrote: Exactly! NOT PROGRAMMING related has NOTHING TODO HERE! Please don't shout, please don't top post agreed. and what gives you the right to determine what is or is not on topic here? The same right as anyo

Re: A difficulty with lists

2012-08-15 Thread Madison May
On Monday, August 6, 2012 3:50:13 PM UTC-4, Mok-Kong Shen wrote: > I ran the following code: > > > > def xx(nlist): > >print("begin: ",nlist) > >nlist+=[999] > >print("middle:",nlist) > >nlist=nlist[:-1] > >print("final: ",nlist) > > > > u=[1,2,3,4] > > print(u) > >

Re: email with a non-ascii charset in Python3 ?

2012-08-15 Thread Steven D'Aprano
On Wed, 15 Aug 2012 17:57:47 +0100, MRAB wrote: >> #!/usr/bin/python3 >> #_*_ coding: latin1 _*_ >> > Aw well as the other replies, the "coding" line should be: > > #-*- coding: latin1 -*- I don't believe that actually matters to Python. It may matter to Emacs or some other editors, but Python

Re: dbf.py API question concerning Index.index_search()

2012-08-15 Thread Tim Chase
On 08/15/12 18:26, Ethan Furman wrote: >.index_search( > match, > start=None, > stop=None, > nearest=False, > partial=False ) > > The defaults are to search the entire index for exact matches and raise > NotFoundError if it can't find anything. > > The question i

Re: New image and color management library for Python 2+3

2012-08-15 Thread 88888 Dihedral
Christian Heimes於 2012年8月15日星期三UTC+8上午2時22分54秒寫道: > Hello fellow Pythonistas, > > > > I'm looking for co-developers, testers, documentation writers and users > > for a new image library I created. The code is available at > > https://bitbucket.org/tiran/smc.freeimage > > > > > > Backgroun

dbf.py API question concerning Index.index_search()

2012-08-15 Thread Ethan Furman
Indexes have a new method (rebirth of an old one, really): .index_search( match, start=None, stop=None, nearest=False, partial=False ) The defaults are to search the entire index for exact matches and raise NotFoundError if it can't find anything. match is the search

Re: OT: Monty Python in Syria

2012-08-15 Thread Mark Lawrence
On 15/08/2012 20:15, Tamer Higazi wrote: Exactly! NOT PROGRAMMING related has NOTHING TODO HERE! Please don't shout, please don't top post and what gives you the right to determine what is or is not on topic here? The subject is also clearly marked OT or did that escape your attention? --

Re: A difficulty with lists

2012-08-15 Thread Rob Day
> The list nlist inside of function xx is not the same as the variable u > outside of the function: nlist and u refer to two separate list objects. > When you modify nlist, you are not modifying u. > Well - that's not quite true. Before call

Re: Dynamically determine base classes on instantiation

2012-08-15 Thread MRAB
On 15/08/2012 22:17, Thomas Bach wrote: Hi list, I'm confronted with a strang problem I cannot find a clean solution for. To me it seems like I need meta-classes. Anyway, I stucked a bit deeper in that topic and couldn't find a proper solution neither. But, judge for yourselve. I want a class t

Help needed installing easy_install and lxml2

2012-08-15 Thread Ian
Hi, On a reasonably fresh (3 day old) install of 64 bit windows 7, I have installed the 64 bit Python 2.7.3 from http://www.python.org/download/ Then I installed the 64 bit version of easy_install using http://pypi.python.org/pypi/setuptools And then install lxml 2.3.5, for which I use the

Dynamically determine base classes on instantiation

2012-08-15 Thread Thomas Bach
Hi list, I'm confronted with a strang problem I cannot find a clean solution for. To me it seems like I need meta-classes. Anyway, I stucked a bit deeper in that topic and couldn't find a proper solution neither. But, judge for yourselve. I want a class that determines on instantiating its base c

Re: A difficulty with lists

2012-08-15 Thread Madison May
On Monday, August 6, 2012 3:50:13 PM UTC-4, Mok-Kong Shen wrote: > I ran the following code: > > > > def xx(nlist): > >print("begin: ",nlist) > >nlist+=[999] > >print("middle:",nlist) > >nlist=nlist[:-1] > >print("final: ",nlist) > > > > u=[1,2,3,4] > > print(u) > >

[ANNC] pybotwar-0.8

2012-08-15 Thread Lee Harr
pybotwar is a fun and educational game where players write computer programs to control simulated robots. http://pybotwar.googlecode.com/ The focus of this release is making all functionality available from the PyQt interface and making PyQt the default interface. pybotwar uses pybox2d for the

Re: OT: Monty Python in Syria

2012-08-15 Thread Tamer Higazi
Exactly! NOT PROGRAMMING related has NOTHING TODO HERE! Tamer Am 15.08.2012 16:42, schrieb Dotan Cohen: > On Wed, Aug 15, 2012 at 5:41 PM, Dotan Cohen wrote: >> And now for something completely different. >> >> Not programming related, but at 1:20 I was expecting a different question: >> http:

Re: Sharing code between different projects?

2012-08-15 Thread Miki Tebeka
> In plus I'm using perforce which doesn't have any svn:externals-like You can probably use views to this (http://www.perforce.com/perforce/r12.1/manuals/cmdref/o.views.html). > Second problem is that one of the two projects has a quite insane > requirement, which is to be able to re-run itself o

Re: email with a non-ascii charset in Python3 ?

2012-08-15 Thread MRAB
On 15/08/2012 13:16, Helmut Jarausch wrote: Hi, I'm sorry to ask such a FAQ but still I couldn't find an answer - neither in the docs nor the web. What's wrong with the following script? Many thanks for a hint, Helmut. #!/usr/bin/python3 #_*_ coding: latin1 _*_ Aw well as the other replies

Re: _mysql_exceptions.OperationalError: (2005, "Unknown MySQL server host

2012-08-15 Thread nepaul
在 2012年8月15日星期三UTC+8下午11时22分49秒,Alain Ketterlin写道: > Hans Mulder writes: > > > > > On 15/08/12 15:30:26, nepaul wrote: > > >> The code: > > >> import MySQLDB > > >> strCmd = "user = 'root', passwd = '123456', db = 'test', host = > >> 'localhost'" > > >> > > >> > > >> > > >> _mysql_ex

Re: Flushing buffer on file copy on linux

2012-08-15 Thread Antoine Pitrou
J gmail.com> writes: > > Now, the problem I have is that linux tends to buffer data writes to a > device, and I want to work around that. When run in normal non-stress > mode, the program is slow enough that the linux buffers flush and put > the file on disk before the hash occurs. However, whe

Re: _mysql_exceptions.OperationalError: (2005, "Unknown MySQL server host

2012-08-15 Thread Alain Ketterlin
Hans Mulder writes: > On 15/08/12 15:30:26, nepaul wrote: >> The code: >> import MySQLDB >> strCmd = "user = 'root', passwd = '123456', db = 'test', host = 'localhost'" >> >> >> >> _mysql_exceptions.OperationalError: (2005, "Unknown MySQL server host 'user >> = 'root', >> passwd = '123456', d

Re: _mysql_exceptions.OperationalError: (2005, "Unknown MySQL server host

2012-08-15 Thread Iuri
MySQLdb.connect does not accept a "connection string" parameter. On Wed, Aug 15, 2012 at 11:53 AM, nepaul wrote: > 在 2012年8月15日星期三UTC+8下午10时23分24秒,Mark Lawrence写道: > > On 15/08/2012 14:30, nepaul wrote: > > > > > The code: > > > > > import MySQLDB > > > > > strCmd = "user = 'root', passwd = '123

Re: _mysql_exceptions.OperationalError: (2005, "Unknown MySQL server host

2012-08-15 Thread Hans Mulder
On 15/08/12 15:30:26, nepaul wrote: > The code: > import MySQLDB > strCmd = "user = 'root', passwd = '123456', db = 'test', host = 'localhost'" > > > > _mysql_exceptions.OperationalError: (2005, "Unknown MySQL server host 'user = > 'root', > passwd = '123456', db = 'test', host = 'localhost'' (

Verify the integrity of the tar file with tarfile module?

2012-08-15 Thread rudson alves
Hello, I took a Slackware package file .tar (uncompressed) and edited with random characters to generate any error in its structure, as shown in the test bash below: $ tar -tf zoo.tar ./ install/ install/slack-desc tar: Pulando para o próximo cabeçalho tar: Exiting with failure status due to

Re: _mysql_exceptions.OperationalError: (2005, "Unknown MySQL server host

2012-08-15 Thread nepaul
在 2012年8月15日星期三UTC+8下午10时23分24秒,Mark Lawrence写道: > On 15/08/2012 14:30, nepaul wrote: > > > The code: > > > import MySQLDB > > > strCmd = "user = 'root', passwd = '123456', db = 'test', host = 'localhost'" > > > > > > _mysql_exceptions.OperationalError: (2005, "Unknown MySQL server host 'user

Re: OT: Monty Python in Syria

2012-08-15 Thread Dotan Cohen
On Wed, Aug 15, 2012 at 5:41 PM, Dotan Cohen wrote: > And now for something completely different. > > Not programming related, but at 1:20 I was expecting a different question: > http://www.aljazeera.com/news/middleeast/2012/08/2012813103922872697.html > > I figured if anybody could appreciate tha

OT: Monty Python in Syria

2012-08-15 Thread Dotan Cohen
And now for something completely different. Not programming related, but at 1:20 I was expecting a different question: http://www.aljazeera.com/news/middleeast/2012/08/2012813103922872697.html I figured if anybody could appreciate that, it would be the folks here. Enjoy! -- Dotan Cohen http://

Re: _mysql_exceptions.OperationalError: (2005, "Unknown MySQL server host

2012-08-15 Thread Mark Lawrence
On 15/08/2012 14:30, nepaul wrote: The code: import MySQLDB strCmd = "user = 'root', passwd = '123456', db = 'test', host = 'localhost'" _mysql_exceptions.OperationalError: (2005, "Unknown MySQL server host 'user = 'root', passwd = '123456', db = 'test', host = 'localhost'' (11004)") My high

Re: email with a non-ascii charset in Python3 ?

2012-08-15 Thread Helmut Jarausch
On Wed, 15 Aug 2012 14:48:40 +0200, Christian Heimes wrote: > Am 15.08.2012 14:16, schrieb Helmut Jarausch: >> Hi, >> >> I'm sorry to ask such a FAQ but still I couldn't find an answer - >> neither in the docs nor the web. >> >> What's wrong with the following script? >> >> Many thanks for a hi

Re: [OT] Posting under ones full name

2012-08-15 Thread Grant Edwards
On 2012-08-15, Chris Angelico wrote: > On Wed, Aug 15, 2012 at 12:06 PM, Thomas 'PointedEars' Lahn > wrote: >> Please use `[...]' or `[?]' to indicate omission instead. I could have >> written `politeness...' myself. > > Incidentally, how _do_ the square brackets help? Because that's the standar

_mysql_exceptions.OperationalError: (2005, "Unknown MySQL server host

2012-08-15 Thread nepaul
The code: import MySQLDB strCmd = "user = 'root', passwd = '123456', db = 'test', host = 'localhost'" _mysql_exceptions.OperationalError: (2005, "Unknown MySQL server host 'user = 'root', passwd = '123456', db = 'test', host = 'localhost'' (11004)") -- http://mail.python.org/mailman/listinfo

python+libxml2+scrapy AttributeError: 'module' object has no attribute 'HTML_PARSE_RECOVER'

2012-08-15 Thread Dmitry Arsentiev
Hello. Has anybody already meet the problem like this? - AttributeError: 'module' object has no attribute 'HTML_PARSE_RECOVER' When I run scrapy, I get File "/usr/local/lib/python2.7/site-packages/scrapy/selector/factories.py", line 14, in libxml2.HTML_PARSE_NOERROR + \ AttributeError: 'm

Re: email with a non-ascii charset in Python3 ?

2012-08-15 Thread Christian Heimes
Am 15.08.2012 14:16, schrieb Helmut Jarausch: > Hi, > > I'm sorry to ask such a FAQ but still I couldn't find an answer - neither in > the docs nor the web. > > What's wrong with the following script? > > Many thanks for a hint, > Helmut. > > #!/usr/bin/python3 > #_*_ coding: latin1 _*_ > > i

email with a non-ascii charset in Python3 ?

2012-08-15 Thread Helmut Jarausch
Hi, I'm sorry to ask such a FAQ but still I couldn't find an answer - neither in the docs nor the web. What's wrong with the following script? Many thanks for a hint, Helmut. #!/usr/bin/python3 #_*_ coding: latin1 _*_ import smtplib from email.message import Message import datetime msg= Mess

Re: [OT] Posting under ones full name

2012-08-15 Thread Thomas 'PointedEars' Lahn
Chris Angelico wrote: > Thomas 'PointedEars' Lahn wrote: >> Chris Angelico wrote: >>> I have my surname in my From address, but I tend to sign my posts >>> "ChrisA" (no relation, btw, to DaveA, though our surnames are >>> similar). That's generally been sufficient for distinguishing >>> purposes,

Re: Sharing code between different projects?

2012-08-15 Thread andrea crotti
Also looking at logilab-common I thought that it would be great if we could actually make this "common" library even open source, and use it as one of the other many external libraries. Since Python code is definitively not the the core business of this company I might even convince them, but the

Re: Strange behavior

2012-08-15 Thread Alain Ketterlin
light1qu...@gmail.com writes: > I got my answer by reading your posts and referring to: > http://docs.python.org/reference/compound_stmts.html#the-for-statement > (particularly the shaded grey box) Not that the problem is not specific to python (if you erase the current element when traversing a

Re: Strange behavior

2012-08-15 Thread Alain Ketterlin
Chris Angelico writes: > Other people have explained the problem with your code. I'll take this > example as a way of introducing you to one of Python's handy features > - it's an idea borrowed from functional languages, and is extremely > handy. It's called the "list comprehension", and can be l

Re: [OT] Posting under ones full name

2012-08-15 Thread Steven D'Aprano
On Wed, 15 Aug 2012 17:41:20 +1000, Chris Angelico wrote: > On Wed, Aug 15, 2012 at 5:28 PM, Ian Kelly > wrote: >> Irrelevant. Why would an author adhering to common principles of style >> ever use square-bracketed dots in a statement that he authored himself? > > You mean exactly the way he di

Re: Sharing code between different projects?

2012-08-15 Thread andrea crotti
2012/8/14 Cameron Simpson : > > Having just skimmed this thread, one thing I haven't quite seen suggested is > this: > > Really do make a third "utilities" project, and treat "the project" and > "deploy" as separate notions. So to actually run/deploy project A's code > you'd have a short script tha

Re: something about split()???

2012-08-15 Thread Mark Lawrence
On 14/08/2012 18:09, Jean-Michel Pichavant wrote: Ramchandra Apte wrote: A pythonic answer would be bottom-posted :p JM He or she is still top posting. I'm given up asking. -- Cheers. Mark Lawrence. -- http://mail.python.org/mailman/listinfo/python-list

Re: [OT] Posting under ones full name

2012-08-15 Thread Chris Angelico
On Wed, Aug 15, 2012 at 5:28 PM, Ian Kelly wrote: > Irrelevant. Why would an author adhering to common principles of > style ever use square-bracketed dots in a statement that he authored > himself? You mean exactly the way he did in the post you quoted me as quoting? ChrisA -- http://mail.pyt

Re: [OT] Posting under ones full name

2012-08-15 Thread Ian Kelly
On Tue, Aug 14, 2012 at 9:18 PM, Chris Angelico wrote: > On Wed, Aug 15, 2012 at 12:06 PM, Thomas 'PointedEars' Lahn > wrote: >> Please use `[...]' or `[…]' to indicate omission instead. I could have >> written `politeness...' myself. > > Incidentally, how _do_ the square brackets help? The squ