Re: isinstance(False, int)

2010-03-08 Thread Bruno Desthuilliers
Rolando Espinoza La Fuente a écrit : On Fri, Mar 5, 2010 at 2:32 PM, mk mrk...@gmail.com wrote: Arnaud Delobelle wrote: 1 == True True 0 == False True So what's your question? Well nothing I'm just kind of bewildered: I'd expect smth like that in Perl, but not in Python.. Although I can

libc Sleep api performs a busy waiting

2010-03-08 Thread Mahesh
Hi, I am having a problem while using sleep function from libc , the thread in which i am calling it is getting struck and not allowing other threads to execute. Here is a simple code that i am trying to exeute import threading import time import dl def dummy1():

Re: The C language like the Python, by the Python and for the Python--- PythoidC

2010-03-08 Thread CHEN Guang
Dear Stefan, Thanks a lot for your interest in PythoidC. Yes, PythoidC takes regular expression to parse C header files, but there is no danger at all, because, the parsed result is only used for introspecting and auto-completion, has noting to do with syntax converting and compiling. I just

Re: running a program on many processors

2010-03-08 Thread Processor-Dev1l
On Mar 8, 1:18 am, Paweł Banyś moc.li...@synabp.reverse_the_string wrote: Hello, I have already read about Python and multiprocessing which allows using many processors. The idea is to split a program into separate tasks and run each of them on a separate processor. However I want to run a

libc Sleep api performs a busy waiting

2010-03-08 Thread Joe Fox
Hi , I am having a problem while using sleep function from libc , the thread in which i am calling it is getting struck and not allowing other threads to execute. Here is a simple code that i am trying to exeute import threading import time import dl def dummy1():

Re: Reverse engineering CRC?

2010-03-08 Thread Dave Angel
Steven D'Aprano wrote: On Mon, 08 Mar 2010 16:09:12 +1300, Gregory Ewing wrote: Given some known data/crc pairs, how feasible is it to figure out the polynomial being used to generate the crc? Google is your friend: http://www.woodmann.com/fravia/crctut1.htm That page was

Re: Best practice way to detect internet connectivity under Python 2.6/Windows

2010-03-08 Thread Tim Golden
On 08/03/2010 02:41, pyt...@bdurham.com wrote: Is the best pratice way to detect internet connectivity under Windows (using Python 2.6) simply to attempt to access a known internet website using urllib or urlib2 wrapped in a try/except construct? Well, in theory you could use the Internet API:

Re: Curiosity stirkes me on 'import this'.

2010-03-08 Thread Daniel Fetchinson
I took a look at the 'this' module to see where the file is stored. This is probably old news to some people, but was new to me. print this.s Gur Mra bs Clguba, ol Gvz Crgref Ornhgvshy vf orggre guna htyl. Rkcyvpvg vf orggre guna vzcyvpvg. Fvzcyr vf orggre guna pbzcyrk. Pbzcyrk vf orggre

Re: Reverse engineering CRC?

2010-03-08 Thread Gregory Ewing
Steven D'Aprano wrote: Can you just ask the application developer what CRC is being used? Or look at the source code? Disassemble the binary? There's no source, and the binary is enormous. I could ask, but I wouldn't hold out much hope of them being willing to tell me. it appears that the

Re: negative counts in collections.Counter?

2010-03-08 Thread Vlastimil Brom
2010/3/8 Raymond Hettinger pyt...@rcn.com: On Mar 7, 5:46 pm, Steven D'Aprano st...@remove-this- cybersource.com.au wrote: Given that Counter supports negative counts, it looks to me that the behaviour of __add__ and __sub__ is fundamentally flawed. You should raise a bug report (feature

Re: Curiosity stirkes me on 'import this'.

2010-03-08 Thread Ben Finney
Daniel Fetchinson fetchin...@googlemail.com writes: I'm curious. Was this encoded purely for fun? Yes. For some more fun, try measuring the ‘this’ module source code against the principles in the Zen. -- \ “Leave nothing to chance. Overlook nothing. Combine | `\

Re: negative counts in collections.Counter?

2010-03-08 Thread Steven D'Aprano
On Sun, 07 Mar 2010 22:31:00 -0800, Raymond Hettinger wrote: On Mar 7, 5:46 pm, Steven D'Aprano st...@remove-this- cybersource.com.au wrote: Given that Counter supports negative counts, it looks to me that the behaviour of __add__ and __sub__ is fundamentally flawed. You should raise a bug

Re: A scopeguard for Python

2010-03-08 Thread Steve Holden
Alf P. Steinbach wrote: * Gabriel Genellina: En Thu, 04 Mar 2010 20:52:04 -0300, Alf P. Steinbach al...@start.no escribió: Sorry, as with the places noted above, I can't understand what you're trying to say here. Regarding your posts, neither can I. All the time. Sorry, deciphering your

Re: libc Sleep api performs a busy waiting

2010-03-08 Thread Steve Holden
Mahesh wrote: Hi, I am having a problem while using sleep function from libc , the thread in which i am calling it is getting struck and not allowing other threads to execute. Here is a simple code that i am trying to exeute import threading import time import dl def dummy1():

Re: Conditional based on whether or not a module is being used

2010-03-08 Thread Jean-Michel Pichavant
Pete Emerson wrote: On Mar 5, 1:14 pm, Chris Rebert c...@rebertia.com wrote: On Fri, Mar 5, 2010 at 12:25 PM, Pete Emerson pemer...@gmail.com wrote: On Fri, Mar 5, 2010 at 12:17 PM, Chris Rebert c...@rebertia.com wrote: On 3/5/10, Pete Emerson pemer...@gmail.com wrote:

Re: Reverse engineering CRC?

2010-03-08 Thread Dave Angel
Gregory Ewing wrote: Steven D'Aprano wrote: Can you just ask the application developer what CRC is being used? Or look at the source code? Disassemble the binary? There's no source, and the binary is enormous. I could ask, but I wouldn't hold out much hope of them being willing to tell me.

Re: Import problem

2010-03-08 Thread Jean-Michel Pichavant
Johny wrote: I have this directory structure C: \A __init__.py amodule.py \B __init__.py bmodule.py \D __init__.py dmodule.py and I want to import bmodule.py C:\cd \ C:\python Python 2.5 (r25:51908,

What to do if anything bites.

2010-03-08 Thread Google Adsense
What to do if anything bites. Check our bites treatment at http://108ambulance.blogspot.com/2010/03/108-ambulance-home-page.html -- http://mail.python.org/mailman/listinfo/python-list

ANNOUNCE: Major Feature Release - NHI1-0.7, PLMK-1.6 and libmsgque-4.5

2010-03-08 Thread Andreas Otto
Dear User, ANNOUNCE:Major Feature Release libmsgque: Application-Server-Toolkit for C, C++, JAVA, C#, TCL, PERL, PYTHON, VB.NET PLMK: Programming-Language-Microkernel NHI1: Non-Human-Intelligence #1 SUMMARY === This is

Re: A scopeguard for Python

2010-03-08 Thread sstein...@gmail.com
On Mar 8, 2010, at 7:28 AM, Steve Holden wrote: But your response, both the out of context quoting and your comment, seems solely designed to convey a negative impression instead of addressing any technical issue. This isn't an isolated case, Alf. Physician, heal thyself. As far as I can

Re: NoSQL Movement?

2010-03-08 Thread Xah Lee
many people mentioned scalibility... though i think it is fruitful to talk about at what size is the NoSQL databases offer better scalability than SQL databases. For example, consider, if you are within world's top 100th user of database in terms of database size, such as Google, then it may be

Converting HTML to PDF using Python?

2010-03-08 Thread Oltmans
Hi Python superstars, Guys, any ideas on how to convert HTML files to PDF files? Or as an alternative, how to convert HTML files to an image file(jpeg/png/etc)? Ideally, the converted PDF/Image file should like exactly like the way HTML file looks in the browser. I really have no idea about this

Re: negative counts in collections.Counter?

2010-03-08 Thread Chris Rebert
On Mon, Mar 8, 2010 at 4:21 AM, Steven D'Aprano st...@remove-this-cybersource.com.au wrote: On Sun, 07 Mar 2010 22:31:00 -0800, Raymond Hettinger wrote: On Mar 7, 5:46 pm, Steven D'Aprano st...@remove-this- cybersource.com.au wrote: Given that Counter supports negative counts, it looks to me

Trouble with quotes

2010-03-08 Thread Stephen Nelson-Smith
Hi, I've written some (primitive) code to parse some apache logfies and establish if apache has appended a session cookie to the end. We're finding that some browsers don't and apache doesn't just append a - - it just omits it. It's working fine, but for an edge case: Couldn't match

Re: Trouble with quotes

2010-03-08 Thread Martin P. Hellwig
On 03/08/10 17:06, Stephen Nelson-Smith wrote: Hi, I've written some (primitive) code to parse some apache logfies and establish if apache has appended a session cookie to the end. We're finding that some browsers don't and apache doesn't just append a - - it just omits it. It's working fine,

Re: Converting HTML to PDF using Python?

2010-03-08 Thread CM
On Mar 8, 10:36 am, Oltmans rolf.oltm...@gmail.com wrote: Hi Python superstars, Guys, any ideas on how to convert HTML files to PDF files? Or as an alternative, how to convert HTML files to an image file(jpeg/png/etc)? Ideally, the converted PDF/Image file should like exactly like the way

ssl, v23 client, v3 server...

2010-03-08 Thread Dino Viehland
In the ssl module docs (and in the tests) it says that if you have a client specifying PROTOCOL_SSLv23 (so it'll use v2 or v3) and a server specifying PROTOCOL_SSLv3 (so it'll only use v3) that you cannot connect between the two. Why doesn't this end up using SSL v3 for the communication? --

Re: Converting HTML to PDF using Python?

2010-03-08 Thread Terry Reedy
On 3/8/2010 12:51 PM, CM wrote: On Mar 8, 10:36 am, Oltmansrolf.oltm...@gmail.com wrote: Hi Python superstars, Guys, any ideas on how to convert HTML files to PDF files? Or as an alternative, how to convert HTML files to an image file(jpeg/png/etc)? Ideally, the converted PDF/Image file

Re: Calculating very large exponents in python

2010-03-08 Thread geremy condra
On Mon, Mar 8, 2010 at 2:15 AM, Fahad Ahmad miracles...@hotmail.com wrote: Thanks Geremy, That has been an absolute bump... GOD i cant sit on my chair, it has worked even on 512 bit number and with no time.. superb i would say. lastly, i am using the code below to calculate

Re: Calculating very large exponents in python

2010-03-08 Thread geremy condra
On Mon, Mar 8, 2010 at 2:05 PM, geremy condra debat...@gmail.com wrote: On Mon, Mar 8, 2010 at 2:15 AM, Fahad Ahmad miracles...@hotmail.com wrote: Thanks Geremy, That has been an absolute bump... GOD i cant sit on my chair, it has worked even on 512 bit number and with no

Re: NoSQL Movement?

2010-03-08 Thread Duncan Booth
Xah Lee xah...@gmail.com wrote: For example, consider, if you are within world's top 100th user of database in terms of database size, such as Google, then it may be that the off-the-shelf tools may be limiting. But how many users really have such massive size of data? You've totally missed

Newbie question: python versions differ per user?

2010-03-08 Thread BobAalsma
I'm on Mac OS X 10.5.8 and downloaded 2.6.4 Mac Installer Disk Image as/in(?) the sys admin user. For this user Pyhton 2.6.4 is now the current version. I want to use Python outside the sys asdmin user. However, all other users still use Python 2.5.1 (Apple delivered). The sys admin user looks in

Re: Calculating very large exponents in python

2010-03-08 Thread Mark Dickinson
[Replying to Geremy's reply because the OP's post didn't show up in my newsreader.] On Mar 7, 8:40 pm, geremy condra debat...@gmail.com wrote: On Sun, Mar 7, 2010 at 1:55 PM, Fahad Ahmad miracles...@hotmail.com wrote: Dear All, i am writing my crytographic scheme in python, i am just a new

Re: negative counts in collections.Counter?

2010-03-08 Thread Raymond Hettinger
[Steven D'Aprano] Thanks for the explanation Raymond. A few comments follow: You're welcome :-) Would you consider a feature enhancement adding an additional method, analogous to update(), to perform subtractions? I recognise that it's easy to subclass and do it yourself, but there does

Re: negative counts in collections.Counter?

2010-03-08 Thread Daniel Stutzbach
On Mon, Mar 8, 2010 at 1:24 PM, Raymond Hettinger pyt...@rcn.com wrote: Instinct says that conflating two models can be worse for usability than just picking one of the models and excluding the other. Toward that end, shouldn't Counter do one (and only one) of the follow? 1) Disallow

Re: write to remote ile

2010-03-08 Thread monkeys paw
On 3/7/2010 9:53 PM, Martin P. Hellwig wrote: On 03/08/10 02:51, monkeys paw wrote: On 3/7/2010 9:20 PM, Martin P. Hellwig wrote: On 03/08/10 02:10, monkeys paw wrote: I can xfer a file from a remote server using: import urllib2 as u x=u.urlopen('http://tycho.usno.navy.mil/cgi-bin/timer.pl')

Re: negative counts in collections.Counter?

2010-03-08 Thread Raymond Hettinger
[Vlastimil Brom] Thank you very much for the exhaustive explanation Raymond! You're welcome. I am by far not able to follow all of the mathematical background, but even for zero-truncating multiset, I would expect the truncation on input rather than on output of some operations. I debated

Re: Reverse engineering CRC?

2010-03-08 Thread Gregory Ewing
Dave Angel wrote: If you know so little about the value, how do you even know it's a CRC ? Could it be a ones-complement sum, such as used in Ethernet? I'm going by the fact that the application reports a CRC mismatch when it's wrong. I can't be sure that what it calls a CRC is really a true

Re: Import problem

2010-03-08 Thread News123
Hi Steven, Steven D'Aprano wrote: On Sat, 06 Mar 2010 03:53:53 -0800, Johny wrote: import sys sys.path.append('C:\\A') from A.B import bmodule Traceback (most recent call last): File stdin, line 1, in module ImportError: No module named A.B The current directory is irrelevant, except

Re: negative counts in collections.Counter?

2010-03-08 Thread Gregory Ewing
Raymond Hettinger wrote: Instead the choice was to implement the four methods as multiset operations. As such, they need to correspond to regular set operations. Seems to me you're trying to make one data type do the work of two, and ending up with something inconsistent. I think you should

Re: negative counts in collections.Counter?

2010-03-08 Thread Vlastimil Brom
2010/3/8 Raymond Hettinger pyt...@rcn.com: ... [snip detailed explanations] ... In this case, we have an indication that what you really want is a separate class supporting elementwise binary and unary operations on vectors (where the vector fields are accessed by a dictionary key instead of a

Re: Import problem

2010-03-08 Thread News123
Jean-Michel Pichavant wrote: Johny wrote: I have this directory structure C: \A __init__.py amodule.py \B __init__.py bmodule.py \D __init__.py dmodule.py and I want to import bmodule.py

Re: Import problem

2010-03-08 Thread News123
Jean-Michel Pichavant wrote: Johny wrote: I have this directory structure C: \A __init__.py amodule.py \B __init__.py bmodule.py \D __init__.py dmodule.py and I want to import bmodule.py

Re: libc Sleep api performs a busy waiting

2010-03-08 Thread News123
Hi Steve, Steve Holden wrote: Mahesh wrote: Hi, I am having a problem while using sleep function from libc , the thread in which i am calling it is getting struck and not allowing other threads to execute. Here is a simple code that i am trying to exeute import threading import time

Re: What to do if anything bites.

2010-03-08 Thread News123
Google Adsense wrote: What to do if anything bites. Check our bites treatment at http://108ambulance.blogspot.com/2010/03/108-ambulance-home-page.html Pythons don't bite -- http://mail.python.org/mailman/listinfo/python-list

related lists mean value

2010-03-08 Thread dimitri pater - serpia
Hi, I have two related lists: x = [1 ,2, 8, 5, 0, 7] y = ['a', 'a', 'b', 'c', 'c', 'c' ] what I need is a list representing the mean value of 'a', 'b' and 'c' while maintaining the number of items (len): w = [1.5, 1.5, 8, 4, 4, 4] I have looked at iter(tools) and next(), but that did not help

Re: negative counts in collections.Counter?

2010-03-08 Thread Raymond Hettinger
[Gregory Ewing] I think you should be providing two types: one is a multiset, which disallows negative counts altogether; the other behaves like a sparse vector with appropriate arithmetic operations. That is pretty close to what I said above: In this case, we have an indication that what

Re: write to remote ile

2010-03-08 Thread MRAB
monkeys paw wrote: On 3/7/2010 9:53 PM, Martin P. Hellwig wrote: On 03/08/10 02:51, monkeys paw wrote: On 3/7/2010 9:20 PM, Martin P. Hellwig wrote: On 03/08/10 02:10, monkeys paw wrote: I can xfer a file from a remote server using: import urllib2 as u

Re: Converting HTML to PDF using Python?

2010-03-08 Thread Grant Edwards
On 2010-03-08, Oltmans rolf.oltm...@gmail.com wrote: Guys, any ideas on how to convert HTML files to PDF files? os.system(w3m -dump %s | a2ps -B --borders=no -o - | ps2pdf - %s % (infile,outfile)) -- Grant Edwards grant.b.edwardsYow! Am I accompanied by a

Re: related lists mean value

2010-03-08 Thread MRAB
dimitri pater - serpia wrote: Hi, I have two related lists: x = [1 ,2, 8, 5, 0, 7] y = ['a', 'a', 'b', 'c', 'c', 'c' ] what I need is a list representing the mean value of 'a', 'b' and 'c' while maintaining the number of items (len): w = [1.5, 1.5, 8, 4, 4, 4] I have looked at iter(tools) and

Re: related lists mean value

2010-03-08 Thread Chris Rebert
On Mon, Mar 8, 2010 at 2:34 PM, dimitri pater - serpia dimitri.pa...@gmail.com wrote: Hi, I have two related lists: x = [1 ,2, 8, 5, 0, 7] y = ['a', 'a', 'b', 'c', 'c', 'c' ] what I need is a list representing the mean value of 'a', 'b' and 'c' while maintaining the number of items (len):

Re: Reverse engineering CRC?

2010-03-08 Thread Dave Angel
Gregory Ewing wrote: div class=moz-text-flowed style=font-family: -moz-fixedDave Angel wrote: If you know so little about the value, how do you even know it's a CRC ? Could it be a ones-complement sum, such as used in Ethernet? I'm going by the fact that the application reports a CRC

Re: Python 3.1.2 release candidate

2010-03-08 Thread Mensanator
On Mar 6, 4:13 pm, Benjamin Peterson benja...@python.org wrote: On behalf of the Python development team, I'm pleased to announce a release candidate for the second bugfix release of the Python 3.1 series, Python 3.1.2. This bug fix release fixes numerous issues found in 3.1.1.  This release

Re: related lists mean value

2010-03-08 Thread dimitri pater - serpia
thanks Chris and MRAB! Looks good, I'll try it out On Tue, Mar 9, 2010 at 12:22 AM, Chris Rebert c...@rebertia.com wrote: On Mon, Mar 8, 2010 at 2:34 PM, dimitri pater - serpia dimitri.pa...@gmail.com wrote: Hi, I have two related lists: x = [1 ,2, 8, 5, 0, 7] y = ['a', 'a', 'b', 'c', 'c',

Re: Queue peek?

2010-03-08 Thread Aahz
In article 58f61382-ac79-46fb-8612-a3c9fde29...@c16g2000yqd.googlegroups.com, Veloz michaelve...@gmail.com wrote: The peek parts comes in when the user comes back later to see if their report has done. That is, in my page controller logic, I'd like to look through the complete queue and see if

Re: related lists mean value

2010-03-08 Thread John Posner
On 3/8/2010 5:34 PM, dimitri pater - serpia wrote: Hi, I have two related lists: x = [1 ,2, 8, 5, 0, 7] y = ['a', 'a', 'b', 'c', 'c', 'c' ] what I need is a list representing the mean value of 'a', 'b' and 'c' while maintaining the number of items (len): w = [1.5, 1.5, 8, 4, 4, 4] I have

Re: related lists mean value

2010-03-08 Thread John Posner
On 3/8/2010 9:39 PM, John Posner wrote: snip # gather data tally_dict = defaultdict(Tally) for i in range(len(x)): obj = tally_dict[y[i]] obj.id = y[i] --- statement redundant, remove it obj.total += x[i] obj.count += 1 -John --

Re: related lists mean value

2010-03-08 Thread John Posner
On 3/8/2010 9:43 PM, John Posner wrote: On 3/8/2010 9:39 PM, John Posner wrote: snip obj.id = y[i] --- statement redundant, remove it Sorry for the thrashing! It's more correct to say that the Tally class doesn't require an id attribute at all. So the code becomes: #- from

remove element with ElementTree

2010-03-08 Thread tdan
I have been using ElementTree to write an app, and would like to simply remove an element. But in ElementTree, you must know both the parent and the child element to do this. There is no getparent() function, so I am stuck if I only have an element. I am iterating over a table and getting all td

Re: libc Sleep api performs a busy waiting

2010-03-08 Thread Joe Fox
Hi, actually i have simplified my scenario a lot here , In my actual case , i have to call a C-api which blocks on c select , in a separate thread. my thread is getting struck in that api , and thus blocking all the other threads. Can you point to something which will help me call this

imported var not being updated

2010-03-08 Thread Alex Hall
Hello all: I have a project with many pyw files. One file holds a variable and a function that I find myself using across many other pyw files, so I called it helpers.pyw. The variable is mostRecent, which is a string and is meant to hold a string so I know what the program most recently output;

Re: imported var not being updated

2010-03-08 Thread Gary Herron
Alex Hall wrote: Hello all: I have a project with many pyw files. One file holds a variable and a function that I find myself using across many other pyw files, so I called it helpers.pyw. The variable is mostRecent, which is a string and is meant to hold a string so I know what the program most

Re: imported var not being updated

2010-03-08 Thread Alex Hall
Thanks, it worked as expected. I guess I figured that Python would read my mind and realize that I wanted mostRecent to act globally for the program, imported as a copy or accessed in its own namespace (right term?) Oh well, the day computers can read thoughts like that is the day programmers are

scipy sparse matrix question

2010-03-08 Thread Victor Eijkhout
I can't find any detailed information about scipy.sparse. My specific question: what does for x in A give me when A is a sparse matrix? It seems to yield all nonzero locations, but in what kind of form? Very specifically: how do I get the (i,j) coordinates and the value from x? Victor. --

Re: Calculating very large exponents in python

2010-03-08 Thread casevh
[also replying to Geremy since the OP's message doesn't appear...] On Mar 8, 11:05 am, geremy condra debat...@gmail.com wrote: On Mon, Mar 8, 2010 at 2:15 AM, Fahad Ahmad miracles...@hotmail.com wrote: Thanks Geremy, That has been an absolute bump... GOD i cant sit on my chair, it

How to detect C Function block using python

2010-03-08 Thread Faheem
Hey All, I'm new in this community. I am writing a static analyzer for validating C Code using python and for that I'm looking for a python module/API that will detect Function block of a given C-File. I know simple function can be detected using push { and poping it if character } is found.

[issue7143] get_payload(decode=True) eats last newline in base64 encoded payload

2010-03-08 Thread Joaquin Cuenca Abela
Joaquin Cuenca Abela e98cu...@gmail.com added the comment: Thanks David and Barry! As much as it flatters my ego to be in the first place is MISC/ACK, I have to confess that my family name is Cuenca Abela, Cuenca is not a middle name. Cheers, --

[issue8067] OS X Installer: build errors on 10.6 when targeting 10.4 and earlier

2010-03-08 Thread Ned Deily
Ned Deily n...@acm.org added the comment: It looks like the patches were not applied correctly. -- status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8067 ___

[issue8047] Serialiser in ElementTree returns unicode strings in Py3k

2010-03-08 Thread Stefan Behnel
Stefan Behnel sco...@users.sourceforge.net added the comment: Antoine, in the same comment, you say that it was not backported to Py2 in order to prevent breaking existing code, and then you ask if it's difficult to support in lxml. ;-) Supporting the same behaviour in lxml would either mean

[issue8047] Serialiser in ElementTree returns unicode strings in Py3k

2010-03-08 Thread Florent Xicluna
Florent Xicluna florent.xicl...@gmail.com added the comment: With ET 1.3, you should have an explicit keyword argument xml_declaration: # if xml_declaration or (xml_declaration is None and encoding not in (utf-8, us-ascii)): if method ==

[issue1052827] filelist.findall should use os.lstat

2010-03-08 Thread Pádraig Brady
Pádraig Brady p...@draigbrady.com added the comment: Packaging dangling symlinks is often required, so this is a problem. For e.g. in my package I want to install this symlink: /etc/apache2/sites-enabled/000-default - ../sites-available/myapp.conf -- nosy: +pixelbeat versions: +Python

[issue3137] Python doesn't handle SIGINT well if it arrives during interpreter startup

2010-03-08 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: PyImport_Import() clears errors if a module has no globals, whereas PyEval_GetGlobals() doesn't set any exception on failure. = import_no_global.patch removes this unnecessary PyErr_Clear(). --

[issue3137] Python doesn't handle SIGINT well if it arrives during interpreter startup

2010-03-08 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Py_InitializeEx() calls PyErr_Clear() if PyCodec_Encoder() fails without checking for the exception type. Attached initiliaze_pycodec_error.patch checks for error type: if the error is not an LookupError, display the error and

[issue3137] Python doesn't handle SIGINT well if it arrives during interpreter startup

2010-03-08 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: tok_stdin_decode() clears error without check for the type. tokenizer_error.patch stops the tokenizer with an E_ERROR if the exception is not an UnicodeDecodeError. Fix also err_input() to support E_ERROR: leave the global

[issue3137] Python doesn't handle SIGINT well if it arrives during interpreter startup

2010-03-08 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: Removed file: http://bugs.python.org/file16489/main_pending_calls.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3137 ___

[issue3137] Python doesn't handle SIGINT well if it arrives during interpreter startup

2010-03-08 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Remove main_pending_calls.patch hack: replaced by tokenizer_error.patch. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3137

[issue3137] Python doesn't handle SIGINT well if it arrives during interpreter startup

2010-03-08 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: Added file: http://bugs.python.org/file16493/import_no_global.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3137 ___

[issue3137] Python doesn't handle SIGINT well if it arrives during interpreter startup

2010-03-08 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Remove main_pending_calls.patch hack: replaced by tokenizer_error.patch. With extra tests, I realized that this patchs is still useful to process a SIGINT emitted between Py_Initialize() and PyRun_AnyFileExFlags(). Without the

[issue8050] smtplib SMTP.sendmail (TypeError: expected string or buffer)

2010-03-08 Thread Allison Vollmann
Allison Vollmann allisonv...@gmail.com added the comment: i believe which the parameter msg must be referenced as a string type when called sendmail nor as an MIME[Message, Multipart, Text, Base, Audio] and this is obvious way to do it. but i'm not Dutch :-) -- status: open - closed

[issue1530559] struct.pack raises TypeError where it used to convert

2010-03-08 Thread Meador Inge
Meador Inge mead...@gmail.com added the comment: (2) For 2.x, I'm a bit uncomfortable with introducing the extra Python layer on top of the C layer. Partly I'm worried about accidentally breaking something (it's not 100% clear to me whether there might be hidden side-effects to such a

[issue1731717] race condition in subprocess module

2010-03-08 Thread Florent Xicluna
Florent Xicluna florent.xicl...@gmail.com added the comment: Previous buildbot failures were in test_multiprocessing: http://bugs.python.org/issue1731717#msg100430 Now it should be fixed: - r78777, r78787, r78790 on 2.x - r78798 on 3.x -- resolution: - fixed stage: test needed -

[issue7805] test_multiprocessing failure

2010-03-08 Thread Florent Xicluna
Florent Xicluna florent.xicl...@gmail.com added the comment: This last bug is fixed, too. http://bugs.python.org/issue1731717#msg100643 -- status: pending - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7805

[issue2777] subprocess unit tests for kill, term and send_signal flaky

2010-03-08 Thread Florent Xicluna
Florent Xicluna florent.xicl...@gmail.com added the comment: All this flakiness is fixed: - r78736, r78759, r78761, r78767, r78788, r78789 on 2.x - r78797 on 3.x Note: because of #3137, the send_signal(SIGINT) is retried 2 times on some platforms. -- resolution: - fixed stage:

[issue1731717] race condition in subprocess module

2010-03-08 Thread Yonas
Yonas yona...@gmail.com added the comment: Florent, Have you tested any of the sample test programs mentioned in this bug report? For example, the one by Joel Martin (kanaka). I'd suggest to test those first before marking this issue as fixed. - Yonas -- status: pending - open

[issue1731717] race condition in subprocess module

2010-03-08 Thread Florent Xicluna
Florent Xicluna florent.xicl...@gmail.com added the comment: import subprocess, signal signal.signal(signal.SIGCLD, signal.SIG_IGN) 0 subprocess.Popen(['echo','foo']).wait() foo Traceback (most recent call last): File stdin, line 1, in module File ./Lib/subprocess.py, line 1229, in wait

[issue1731717] race condition in subprocess module

2010-03-08 Thread Florent Xicluna
Changes by Florent Xicluna florent.xicl...@gmail.com: -- keywords: -buildbot ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1731717 ___ ___

[issue1731717] race condition in subprocess module

2010-03-08 Thread Yonas
Yonas yona...@gmail.com added the comment: http://groups.google.com/group/comp.lang.python/browse_thread/thread/9a853d0308c8e55a I'm also glad to see a test case that causes exactly the same error with or without the presence of a ‘daemon.DaemonContext’. Further research shows that handling

[issue8047] Serialiser in ElementTree returns unicode strings in Py3k

2010-03-08 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Le Mon, 08 Mar 2010 09:01:19 +, Stefan Behnel rep...@bugs.python.org a écrit : Antoine, in the same comment, you say that it was not backported to Py2 in order to prevent breaking existing code, and then you ask if it's difficult to

[issue1731717] race condition in subprocess module

2010-03-08 Thread Yonas
Yonas yona...@gmail.com added the comment: Ben Finney's comment suggests to me that this bug is being ignored. Am I wrong? with extra notes in the documentation that anyone using child processes needs to be wary of signal handling. Why should they be wary? We should just fix this bug.

[issue8047] Serialiser in ElementTree returns unicode strings in Py3k

2010-03-08 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- assignee: - georg.brandl components: +Documentation nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8047 ___

[issue1731717] race condition in subprocess module

2010-03-08 Thread Yonas
Yonas yona...@gmail.com added the comment: By the way, in three months from today, this bug will be 3 years old. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1731717 ___

[issue7624] isinstance(... , collections.Callable) fails with oldstyle class instances

2010-03-08 Thread Florent Xicluna
Florent Xicluna florent.xicl...@gmail.com added the comment: Fixed in r78800. Additional tests backported to 3.x. -- resolution: accepted - fixed stage: commit review - committed/rejected status: open - closed title: isinstance(... ,collections.Callable) fails with oldstyle class i

[issue8050] smtplib SMTP.sendmail (TypeError: expected string or buffer)

2010-03-08 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: On the other hand, having a facility somewhere in the stdlib to pass a Message object to SMTP sendmail would be handy. I've made a note of this in my working notes for email6 to see if there's something we want to do about it.

[issue8088] assertSameElements fails with sequences that contain unorderable types

2010-03-08 Thread Ezio Melotti
New submission from Ezio Melotti ezio.melo...@gmail.com: assertSameElements fails with sequences that contain unorderable types such as [2j, 5j, set(), frozenset()]. See also msg98744 in #7837. -- assignee: flox messages: 100654 nosy: ezio.melotti, flox, michael.foord priority: normal

[issue8088] assertSameElements fails with sequences that contain unorderable types

2010-03-08 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- components: +Library (Lib) versions: +Python 2.7, Python 3.1, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8088 ___

[issue8088] assertSameElements fails with sequences that contain unorderable types

2010-03-08 Thread Florent Xicluna
Changes by Florent Xicluna florent.xicl...@gmail.com: -- keywords: +patch resolution: - accepted stage: needs patch - patch review Added file: http://bugs.python.org/file16495/issue8088_unordered_elements.diff ___ Python tracker

[issue8088] assertSameElements fails with sequences that contain unorderable types

2010-03-08 Thread Florent Xicluna
Florent Xicluna florent.xicl...@gmail.com added the comment: Patch against trunk. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8088 ___ ___

[issue8088] assertSameElements fails with sequences that contain unorderable types

2010-03-08 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- versions: -Python 3.1, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8088 ___ ___

[issue7837] assertSameElements doesn't filter enough py3k warnings

2010-03-08 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: Fixed in r78757 (trunk). I opened #8088 for the unorderable types problem. -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker

[issue1731717] race condition in subprocess module

2010-03-08 Thread Gregory P. Smith
Gregory P. Smith g...@krypto.org added the comment: I really don't care about the age of a bug. This bug is young. I've fixed many bugs over twice its age in the past. Regardless, I've got some serious subprocess internal refactoring changes coming in the very near future to explicitly deal

  1   2   >