ANN: mock 0.7.0 release candidate 1

2011-02-25 Thread Fuzzyman
There is a new release of mock: mock 0.7.0 rc1 http://pypi.python.org/pypi/mock This is intended to be the last release of mock before 0.7.0 final and the only changes anticipated are documentation changes which I've finally started work on. mock is a Python library for simple mocking and

Re: Newbie...

2011-02-25 Thread wisecracker
HI Steven... For *small* snippets, say, a single function, you can use the ActiveState Cookbook: http://code.activestate.com/recipes/langs/python/ A few random comments about your code: Thanks duly noted... # Original idea copyright, (C)2009, B.Walker, G0LCU. You can't copyright ideas.

Re: Newbie...

2011-02-25 Thread Corey Richardson
On 02/25/2011 03:18 AM, wisecrac...@tesco.net wrote: True, but it is inside a Python file too. So therefore the idea is in a working state. Then copyright the code. # import afg[RETURN/ENTER] I thought you said you use only STANDARD Python? What's afg? It doesn't seem very standard to

File-backed file system manipulation question

2011-02-25 Thread Chris Willmore
Hi All, I have seen questions regarding mounting and dealing with root owned data, but nothing that appears to solve my particular issue. I am creating an application that needs to mount VM images and do some manipulation (swap kernel, change fstab, etc). Most of the files and directories in

Re: Newbie...

2011-02-25 Thread Corey Richardson
On 02/25/2011 03:39 AM, Corey Richardson wrote: Also, if one understands how a unicode byte looks like in a string, it's pretty easy to understand, and looks a hell of a lot clearer than a bunch of chr()'s without any space between. That's just my two cents. Err..not a unicode byte, but it's

Re: 2to3 chokes on bad character

2011-02-25 Thread Peter Otten
John Machin wrote: On Feb 25, 12:00 am, Peter Otten __pete...@web.de wrote: John Machin wrote: Your Python 2.x code should be TESTED before you poke 2to3 at it. In this case just trying to run or import the offending code file would have given an informative syntax error (you have

Parsing numeric ranges

2011-02-25 Thread Seldon
Hi all, I have to convert integer ranges expressed in a popular compact notation (e.g. 2, 5-7, 20-22, 41) to a the actual set of numbers (i.e. 2,5,7,20,21,22,41). Is there any library for doing such kind of things or I have to write it from scratch ? Thanks in advance for any answers.

Re: Parsing numeric ranges

2011-02-25 Thread Corey Richardson
On 02/25/2011 04:27 AM, Seldon wrote: Hi all, I have to convert integer ranges expressed in a popular compact notation (e.g. 2, 5-7, 20-22, 41) to a the actual set of numbers (i.e. 2,5,7,20,21,22,41). Is there any library for doing such kind of things or I have to write it from scratch

Re: Parsing numeric ranges

2011-02-25 Thread Alain Ketterlin
Seldon sel...@katamail.it writes: I have to convert integer ranges expressed in a popular compact notation (e.g. 2, 5-7, 20-22, 41) to a the actual set of numbers (i.e. 2,5,7,20,21,22,41). What form does the input have? Are they strings, or some other representation? Is there any library

Re: Newbie...

2011-02-25 Thread Steven D'Aprano
On Fri, 25 Feb 2011 03:45:29 -0500, Corey Richardson wrote: On 02/25/2011 03:39 AM, Corey Richardson wrote: Also, if one understands how a unicode byte looks like in a string, it's pretty easy to understand, and looks a hell of a lot clearer than a bunch of chr()'s without any space between.

Python encoding question

2011-02-25 Thread Marc Muehlfeld
Hi, I'm doing my first steps with python and I have a problem with understanding an encoding problem I have. My script: import os os.environ[NLS_LANG] = German_Germany.UTF8 import cx_Oracle connection = cx_Oracle.Connection(username/password@SID) cursor = connection.cursor()

Re: Python encoding question

2011-02-25 Thread Jean-Michel Pichavant
Marc Muehlfeld wrote: Hi, I'm doing my first steps with python and I have a problem with understanding an encoding problem I have. My script: import os os.environ[NLS_LANG] = German_Germany.UTF8 import cx_Oracle connection = cx_Oracle.Connection(username/password@SID) cursor =

Today's Hottest actresses

2011-02-25 Thread Ashraf Ali
Hello friends, what's going on? Would you like to watch hollywood, bollywood. tollywood, hot actresses pictures,biography, filmography. Just visit www.hotpics00.blogspot.com www.hollywood-99.blogspot.com www.hollywoodactors-99.blogspot.com www.bollywoodactors00.blogspot.com --

Re: Re: Python fails on math

2011-02-25 Thread Heather Brown
On 01/-10/-28163 02:59 PM, Grant Edwards wrote: On 2011-02-25, Steven D'Apranosteve+comp.lang.pyt...@pearwood.info wrote: C double *variables* are, but as John suggests, C compilers are allowed (to my knowledge) to keep intermediate results of an expression in the larger-precision FPU

Re: Python encoding question

2011-02-25 Thread Dave Angel
On 01/-10/-28163 02:59 PM, Marc Muehlfeld wrote: Hi, snip TEST = cursor.fetchone() print TEST[0] print TEST When I run this script It prints me: München ('M\xc3\xbcnchen',) Why is the Umlaut of TEST[0] printed and not from TEST? When you print a string, it simply prints it, control

Re: Parsing numeric ranges

2011-02-25 Thread Seldon
On 02/25/2011 10:44 AM, Alain Ketterlin wrote: Seldonsel...@katamail.it writes: I have to convert integer ranges expressed in a popular compact notation (e.g. 2, 5-7, 20-22, 41) to a the actual set of numbers (i.e. 2,5,7,20,21,22,41). What form does the input have? Are they strings, or some

Re: lxml

2011-02-25 Thread Colin J. Williams
On 24-Feb-11 19:39 PM, alex23 wrote: On Feb 24, 6:20 pm, Stefan Behnelstefan...@behnel.de wrote: MRAB, 24.02.2011 01:25: The latest stable release is here: http://pypi.python.org/pypi/lxml/2.2.8 Not quite the latest stable release (that would be 2.3), but at least one that's pre-built

Connect to FTP

2011-02-25 Thread sofia stouki
Hi all,   I am trying to put together a script (Python 2.5, windows xp) that connects to an ftp server and retrieves/uploads files.   I am sure what I have put together is completely insufficient and I get the errors:   Traceback (most recent call last):   File C:\Documents and

Re: Suggestion Reqd for Designing a Website in Python

2011-02-25 Thread joy99
On Feb 25, 12:36 pm, Tim Roberts t...@probo.com wrote: joy99 subhakolkata1...@gmail.com wrote: Dear Group, I have developed one big Machine Learning software a Machine Translation system in Python. Now, I am thinking to make a User Interface of it and upload it in a web site. Do you mean

Re: Suggestion Reqd for Designing a Website in Python

2011-02-25 Thread Daniel Fetchinson
I have developed one big Machine Learning software a Machine Translation system in Python. Now, I am thinking to make a User Interface of it and upload it in a web site. Do you mean you want people to download this from a web site as an executable, and then run it locally on their

Re: Yappi error context not found

2011-02-25 Thread Brian
Thanks - I've opened a ticket at http://code.google.com/p/yappi/issues/detail?id=21 -- http://mail.python.org/mailman/listinfo/python-list

getpass and IDEs

2011-02-25 Thread Andrew
I find that calling getpass produces a warning noting that it can't suppress output, if I'm using idle, wingide, or a few others. If I'm running from the console it works fine, but then I can't make use of ide-integrated debugging. I know I could just set up a test account for development

Make a buildout based application standalone

2011-02-25 Thread Oleksandr Kozachuk
Hi! I try to create a standalone installable version of BlueBream, but also with other appications: What is required to do, to install some Buildout based application without internet connection? The first problem is to create a full dependency list and download all packages. The next is to

Re: Suggestion Reqd for Designing a Website in Python

2011-02-25 Thread joy99
On Feb 25, 8:03 pm, Daniel Fetchinson fetchin...@googlemail.com wrote: I have developed one big Machine Learning software a Machine Translation system in Python. Now, I am thinking to make a User Interface of it and upload it in a web site. Do you mean you want people to download this

Re: Parsing numeric ranges

2011-02-25 Thread Simon Brunning
On 25 February 2011 09:27, Seldon sel...@katamail.it wrote: Hi all, I have to convert integer ranges expressed in a popular compact notation (e.g. 2, 5-7, 20-22, 41) to a the actual set of numbers (i.e. 2,5,7,20,21,22,41). Is there any library for doing such kind of things or I have to write

Removing hidden directory in os.walk()

2011-02-25 Thread Gaëtan Podevijn
Hello, I would like that os.walk() does not walk through hidden directories. I know that with topdow = true, I can modify the subdirectory list in place, but how should I remove every hidden directory from this place in list ? Thank you, Gaëtan --

Re: Removing hidden directory in os.walk()

2011-02-25 Thread Chris Rebert
On Fri, Feb 25, 2011 at 9:40 AM, Gaëtan Podevijn gpode...@gmail.com wrote: Hello, I would like that os.walk() does not walk through hidden directories. I know that with topdow = true, I can modify the subdirectory list in place, but how should I remove every hidden directory from this place in

Re: Connect to FTP

2011-02-25 Thread Chris Rebert
On Fri, Feb 25, 2011 at 6:37 AM, sofia stouki sofsto...@yahoo.com wrote: Hi all, I am trying to put together a script (Python 2.5, windows xp) that connects to an ftp server and retrieves/uploads files. I am sure what I have put together is completely insufficient and I get the errors:

Can you recommend an Experienced Python/SQL contract developer for this 6 - 12 month contract in NYC?

2011-02-25 Thread Ben B. Diamond
Experienced Python/SQL contract developer * 3+ years experience writing clean, concise Python * 3+ years experience tracing, debugging, and maintaining existing code * Experience working closely with a team in a fluid environment with evolving requirements * Strong CS fundamentals (algorithms

Re: getpass and IDEs

2011-02-25 Thread Wolfgang Rohdewald
On Freitag 25 Februar 2011, Andrew wrote: I find that calling getpass produces a warning noting that it can't suppress output, if I'm using idle, wingide, or a few others. If I'm running from the console it works fine, but then I can't make use of ide-integrated debugging. I know I could

Re: Can you recommend an Experienced Python/SQL contract developer for this 6 - 12 month contract in NYC?

2011-02-25 Thread Daniel Mahoney
Thanks, Ben Diamond The Forum Group Information Technologies Division 260 Madison Ave Suite 200 NY, NY 10016 T. 212 687 4050 x355 C. 201 313 6009 www.forumgrp.com http://www.forumgrp.com/ PLEASE, don't include all that Microsoft HTML crap at the end of your post! Good old plain

Re: Parsing numeric ranges

2011-02-25 Thread Suneel Kingrani
very well done.. But I thought it may require a little bit of change in the proposed code.. :) def _revision_list_with_ranges_to_list_without_ranges(revision_list): for revision in revision_list.split(','): if '-' in str(revision): from_revision, _,

Re: getpass and IDEs

2011-02-25 Thread Andrew
On Fri, 25 Feb 2011 20:27:42 +0100, Wolfgang Rohdewald wrote: On Freitag 25 Februar 2011, Andrew wrote: But I'm curious what's different about IDE environments that makes it impossible to suppress output on them, and if there's anything that might be done about this. I'd say your IDE

Re: wxPython SQLite and Reportlab demo

2011-02-25 Thread Beppe
On 25 Feb, 08:33, Tim Roberts t...@probo.com wrote: Beppe giuseppecosta...@gmail.com wrote: I would recommend this my little work on sourceforge. http://sourceforge.net/projects/pyggybank/ you can download an exe (pyggy_w32.7z)  make with py2exe and the source  (pyggy_source.7z) the

ANN: Intro+Intermediate Python course, SF, May 24-26

2011-02-25 Thread wesley chun
Need to get up-to-speed with Python as quickly and as in-depth as possible? Already coding Python but still have areas of uncertainty you need to fill? Then come join me, Wesley Chun, author of Prentice-Hall's bestseller Core Python for a comprehensive intro/intermediate course coming up this May

Re: Tkinter: The good, the bad, and the ugly!

2011-02-25 Thread Gregory Ewing
[Sorry to revive an old thread, but I was away when it occurred and I'd like to make a comment...] Kevin Walzer wrote: This library isn't much different from other Python GUI toolkits--it's dependent on underlying, rather large, platform-specific implementations--but it provides an even

py3k: datetime resolution / isoformat

2011-02-25 Thread spam
When I do: datetime.datetime.now().isoformat(' ') I get the time with the microseconds. The docs says: if microsecond is 0 -MM-DDTHH:MM:SS+HH:MM. How do I set microsecond to 0? datetime.datetime.microsecond = 0 Traceback (most recent call last): File stdin, line 1, in

Re: py3k: datetime resolution / isoformat

2011-02-25 Thread Ned Deily
In article ssZ9p.10276$5v7.5...@newsfe11.iad, s...@uce.gov wrote: When I do: datetime.datetime.now().isoformat(' ') I get the time with the microseconds. The docs says: if microsecond is 0 -MM-DDTHH:MM:SS+HH:MM. How do I set microsecond to 0?

Re: py3k: datetime resolution / isoformat

2011-02-25 Thread MRAB
On 26/02/2011 02:21, s...@uce.gov wrote: When I do: datetime.datetime.now().isoformat(' ') I get the time with the microseconds. The docs says: if microsecond is 0 -MM-DDTHH:MM:SS+HH:MM. How do I set microsecond to 0? datetime.datetime.microsecond = 0 Traceback (most recent call

Re: py3k: datetime resolution / isoformat

2011-02-25 Thread Chris Rebert
On Fri, Feb 25, 2011 at 6:21 PM, s...@uce.gov wrote: When I do:    datetime.datetime.now().isoformat(' ') I get the time with the microseconds. The docs says: if microsecond is 0 -MM-DDTHH:MM:SS+HH:MM. How do I set microsecond to 0?     datetime.datetime.microsecond = 0    

Re: subprocess pipe question

2011-02-25 Thread Rita
The results look right! I did a rather large test and the checksum passed. I will hold off any speed ups as you suggested. On Wed, Feb 23, 2011 at 8:37 PM, Rob Williscroft r...@rtw.me.uk wrote: Rita wrote in news:AANLkTi=88dcpm_kqrs2g620obsnxz0majubfwpeme...@mail.gmail.com in

parsing a file for analysis

2011-02-25 Thread Rita
I have a large text (4GB) which I am parsing. I am reading the file to collect stats on certain items. My approach has been simple, for row in open(file): if INFO in row: line=row.split() user=line[0] host=line[1] __time=line[2] ... I was wondering if there is a framework

[issue11015] Bring test.support docs up to date

2011-02-25 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: The divmod() part of the patch is wrong: assertAlmostEqual does not support tuple arguments. The test succeeds because it first does an exact equality check, which apparently is true on your platform. But if it wasn't, you'd get TypeErrors.

[issue10516] Add list.clear() and list.copy()

2011-02-25 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Reading clear and copy are not supported by bytearray: shouldn't they be? (sort probably really makes no sense on bytearrays.) -- ___ Python tracker rep...@bugs.python.org

[issue11286] Some trivial python 2.x pickles fails to load in Python 3.2

2011-02-25 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com added the comment: Alexander Belopolsky wrote: Alexander Belopolsky belopol...@users.sourceforge.net added the comment: On Thu, Feb 24, 2011 at 3:54 PM, Antoine Pitrou rep...@bugs.python.org wrote: .. I've committed the part of the patch which

[issue11313] Speed up default encode()/decode()

2011-02-25 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com added the comment: Alexander Belopolsky wrote: New submission from Alexander Belopolsky belopol...@users.sourceforge.net: In Python 3.x default encoding is always utf-8, but encode()/decode() still try to look it up. Attached patch eliminates a call to

[issue11015] Bring test.support docs up to date

2011-02-25 Thread Eli Bendersky
Eli Bendersky eli...@gmail.com added the comment: Georg, Good catch on the tuples in assertAlmostEqual, thanks! I see three methods of resolution: 1. Since the floats in this case are powers of 1/2, they could be tested for exact equality, or do you figure there are platforms where this is

[issue11015] Bring test.support docs up to date

2011-02-25 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: (2) would be my choice. (1) *should* be true, but this is a change in the test semantics. (3) would be feature creep and I don't think it's a good idea. -- ___ Python tracker rep...@bugs.python.org

[issue11015] Bring test.support docs up to date

2011-02-25 Thread Eli Bendersky
Eli Bendersky eli...@gmail.com added the comment: Attaching a revised patch with (2) implemented. -- Added file: http://bugs.python.org/file20885/issue11015.py3k.remove_fcmp.2.patch ___ Python tracker rep...@bugs.python.org

[issue10516] Add list.clear() and list.copy()

2011-02-25 Thread Eli Bendersky
Eli Bendersky eli...@gmail.com added the comment: On Fri, Feb 25, 2011 at 10:11, Georg Brandl rep...@bugs.python.org wrote: Georg Brandl ge...@python.org added the comment: Reading clear and copy are not supported by bytearray: shouldn't they be? Perhaps they should, and it's not a big deal

[issue11015] Bring test.support docs up to date

2011-02-25 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Yes, that looks good now. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11015 ___ ___

[issue10516] Add list.clear() and list.copy()

2011-02-25 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Unless someone raises a controversial and non-trivial issue about adding clear() and copy() to bytearray, there is no need for a python-dev discussion on the subject. Just post a patch to the tracker. --

[issue10516] Add list.clear() and list.copy()

2011-02-25 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Yes, it should be discussed on python-dev. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10516 ___

[issue11015] Bring test.support docs up to date

2011-02-25 Thread Eli Bendersky
Eli Bendersky eli...@gmail.com added the comment: Georg Brandl ge...@python.org added the comment: Yes, that looks good now. Thanks. fcmp FUZZ removal committed in revision 88558 -- ___ Python tracker rep...@bugs.python.org

[issue11222] Python3.2rc3 fails to build on Mac OS X with a non-framework build

2011-02-25 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Does this need to be backported? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11222 ___ ___

[issue11316] RFC822 header parsing API inconsistencies between httplib.HTTPMessage and email.message.Message

2011-02-25 Thread Georges Martin
New submission from Georges Martin jrjsm...@gmail.com: Both httplib.HTTPMessage and email.message.Message classes[1] implements methods for RFC822 headers parsing. Unfortunately, they have different implementations and they do not provide the same level of functionality. One example that is

[issue11222] Python3.2rc3 fails to build on Mac OS X with a non-framework build

2011-02-25 Thread Ned Deily
Ned Deily n...@acm.org added the comment: No backport is needed. The problem was introduced during the 3.2 development cycle by the ABI Version Tagged .so Files feature (PEP 3149). -- ___ Python tracker rep...@bugs.python.org

[issue11314] Subprocess suffers 40% process creation overhead penalty

2011-02-25 Thread Charles-Francois Natali
Charles-Francois Natali neolo...@free.fr added the comment: If you stop to think about it, though, this is actually a shockingly huge percent increase. In any process creation scenario I'm familiar with, its overhead should be so small that you could bump it up several orders of magnitude

[issue10360] _weakrefset.WeakSet.__contains__ should not propagate TypeErrors

2011-02-25 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Backported to 3.1 in r88556, and 2.7 in r88564. -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10360 ___

[issue10516] Add list.clear() and list.copy()

2011-02-25 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: In any case, this issue can be closed. -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10516 ___

[issue11317] Documentation not updated to show string exceptions have been deprecated

2011-02-25 Thread Laurence Rowe
New submission from Laurence Rowe l...@lrowe.co.uk: The documentation at http://docs.python.org/c-api/exceptions.html#deprecation-of-string-exceptions states that String exceptions are still supported in the interpreter to allow existing code to run unmodified, but this will also change in a

[issue11317] Documentation not updated to show string exceptions have been deprecated

2011-02-25 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Thanks, fixed in r88571. -- nosy: +georg.brandl resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11317

[issue941346] AIX shared library fix

2011-02-25 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Backported to 3.1 in r88560, 2.7 in r88568. -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue941346 ___

[issue11184] Broken large file support on AIX

2011-02-25 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Backported to 3.1 in r88562, 2.7 in r88569. -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11184 ___

[issue11318] Python 3.2 FAQ example code typo?

2011-02-25 Thread Boštjan Mejak
New submission from Boštjan Mejak bostjan.me...@gmail.com: I have found a possible typo in an example code of Python 3.2. It's located on page 32 in the PDF version of the FAQ document. The code is: class C: count = 0 # number of times C.__init__ called def __init__(self): C.count =

[issue10516] Add list.clear() and list.copy()

2011-02-25 Thread Boštjan Mejak
Boštjan Mejak bostjan.me...@gmail.com added the comment: I have installed Python 3.2 final on my Windows machine and I get an exception when doing list.copy or list.clear in the interpreter. Why is that so? -- Added file: http://bugs.python.org/file20886/unnamed

[issue10516] Add list.clear() and list.copy()

2011-02-25 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Because they got added *after* 3.2 was released? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10516 ___

[issue11303] b'x'.decode('latin1') is much slower than b'x'.decode('latin-1')

2011-02-25 Thread Steffen Daode Nurpmeso
Steffen Daode Nurpmeso sdao...@googlemail.com added the comment: (Not issue related) Ezio and Alexander: after reading your posts and looking back on my code: you're absolutely right. Doing resize(31) is pointless: it doesn't save space (mempool serves [8],16,24,32 there; and: dynamic,

[issue11316] RFC822 header parsing API inconsistencies between httplib.HTTPMessage and email.message.Message

2011-02-25 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11316 ___ ___

[issue11316] RFC822 header parsing API inconsistencies between httplib.HTTPMessage and email.message.Message

2011-02-25 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- type: behavior - feature request versions: +Python 3.3 -Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11316 ___

[issue10743] 3.2's sysconfig doesn't work with virtualenv

2011-02-25 Thread Palm Kevin
Palm Kevin kevin.p...@labsolution.lu added the comment: I think that this issue needs to be reopened... since it never has been resolved... I just downloaded the new version of Python 3.2 and tried to compile, install and use it on Redhat Linux. Installation went fine (configure with

[issue11318] Python 3.2 FAQ example code typo?

2011-02-25 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Read a little further: Caution: within a method of C, an assignment like ``self.count = 42`` creates a new and unrelated instance named count in ``self``'s own dict. That is, c.count refers to C.count right up until the point where

[issue11318] Python 3.2 FAQ example code typo?

2011-02-25 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Hmm. Rereading your message, is seems like you just didn't understand the statement c.count refers to C.count for any That is a statement about how the language behaves. If there is not yet an instance variable 'count', but a

[issue10516] Add list.clear() and list.copy()

2011-02-25 Thread Boštjan Mejak
Boštjan Mejak bostjan.me...@gmail.com added the comment: Right, right. My bad. Can't wait for Python 3.3! ;) -- Added file: http://bugs.python.org/file20887/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10516

[issue11318] Python 3.2 FAQ example code typo?

2011-02-25 Thread Boštjan Mejak
Boštjan Mejak bostjan.me...@gmail.com added the comment: Caution: within a method of C, an assignment like ``self.count = 42`` creates a new and unrelated instance named count in ``self``'s own dict. More clear is to say *Caution: within a method of class C, an assignment like ``self.count

[issue10743] 3.2's sysconfig doesn't work with virtualenv

2011-02-25 Thread Palm Kevin
Palm Kevin kevin.p...@labsolution.lu added the comment: Please find here a small C app embedding python that shows how to reproduce the problem (It turned out that the problem is caused by the new method Py_SetPath): #include Python.h main(int argc, char **argv) {

[issue11319] Command line option -t (and -tt) does not work for a particular case

2011-02-25 Thread Jérôme Radix
New submission from Jérôme Radix jerome.ra...@gmail.com: The attached example mixes tabs and spaces but python does not report any warning when used with -t. Line 4 contains 1 tab. Lines after line 4 contains spaces. Tested using : Python 2.7.1 (r271:86832, Nov 27 2010, 17:19:03) [MSC v.1500

[issue11316] RFC822 header parsing API inconsistencies between httplib.HTTPMessage and email.message.Message

2011-02-25 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Ah, yes, you are correct. We must reject this, then, since 2.7 is now feature frozen and this is a feature request. -- resolution: - out of date stage: - committed/rejected ___ Python

[issue10743] 3.2's sysconfig doesn't work with virtualenv

2011-02-25 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Le vendredi 25 février 2011 à 13:58 +, Palm Kevin a écrit : Palm Kevin kevin.p...@labsolution.lu added the comment: Please find here a small C app embedding python that shows how to reproduce the problem (It turned out that the problem

[issue11253] autodocument first appearance of ctypes.wintypes constants

2011-02-25 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Can you provide a patch, or show how to do it concretely? -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11253

[issue11320] Usage of API method Py_SetPath causes errors in Py_Initialize() (Posix ony))

2011-02-25 Thread Palm Kevin
New submission from Palm Kevin kevin.p...@labsolution.lu: The new API method Py_SetPath seems bugged. When executing the following code, then the application crashes on Py_Initialize()-call: #include Python.h main(int argc, char **argv) { Py_SetPath(Py_GetPath()); printf(Init\n);

[issue10743] 3.2's sysconfig doesn't work with virtualenv

2011-02-25 Thread Palm Kevin
Palm Kevin kevin.p...@labsolution.lu added the comment: Done: #11320 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10743 ___ ___

[issue10882] Add os.sendfile()

2011-02-25 Thread Giampaolo Rodola'
Giampaolo Rodola' g.rod...@gmail.com added the comment: Committed in r88580. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10882 ___ ___

[issue11232] asyncore - don't throw a traceback when a client disconnects in echo server example

2011-02-25 Thread Giampaolo Rodola'
Giampaolo Rodola' g.rod...@gmail.com added the comment: Fixed. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11232 ___

[issue11316] RFC822 header parsing API inconsistencies between httplib.HTTPMessage and email.message.Message

2011-02-25 Thread Georges Martin
Georges Martin jrjsm...@gmail.com added the comment: No problem. I thought important that the issue and a workaround were documented somehow... :-) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11316

[issue11259] asynchat does not check if terminator is negative integer

2011-02-25 Thread Giampaolo Rodola'
Giampaolo Rodola' g.rod...@gmail.com added the comment: Can you provide a patch including a test case? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11259 ___

[issue11314] Subprocess suffers 40% process creation overhead penalty

2011-02-25 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11314 ___ ___

[issue11314] Subprocess suffers 40% process creation overhead penalty

2011-02-25 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: But in the two scenarios I mentioned (monitoring and Web services such as CGI, neither of which is particularly rare), this is going to make quite a lot of difference That's why I asked for absolute numbers for the overhead difference. A

[issue11314] Subprocess suffers 40% process creation overhead penalty

2011-02-25 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Okay, thanks to Charles-François' measurements, we can deduce that each subprocess launch is at most 0.3ms of user CPU time and 1.2ms of system CPU time. IMO that's not a real problem. -- ___ Python

[issue11232] asyncore - don't throw a traceback when a client disconnects in echo server example

2011-02-25 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Please add the revision number when fixing. -- nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11232 ___

[issue10882] Add os.sendfile()

2011-02-25 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Three comments: * When changing configure.in, you also should regenerate configure. (Now done in r88584). * PyParse_off_t is a bad name for this function. It is not a new C API, so it should be static, and therefore there is no need for the

[issue11316] RFC822 header parsing API inconsistencies between httplib.HTTPMessage and email.message.Message

2011-02-25 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Yes, thanks for that. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11316 ___ ___

[issue11303] b'x'.decode('latin1') is much slower than b'x'.decode('latin-1')

2011-02-25 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com added the comment: r88586: Normalized the encoding names for Latin-1 and UTF-8 to 'latin-1' and 'utf-8' in the stdlib. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11303

[issue11321] 9th import of module _pickle always crashes

2011-02-25 Thread Palm Kevin
New submission from Palm Kevin kevin.p...@labsolution.lu: Please have a look to the following app: #include Python.h main(int argc, char **argv) { int i; printf(START\n); for(i = 0; i 20; i++){ Py_Initialize(); printf(Try import #%i ..., i); PyRun_SimpleString(import

[issue11303] b'x'.decode('latin1') is much slower than b'x'.decode('latin-1')

2011-02-25 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com added the comment: I think we should reset this whole discussion and just go with Alexander's original patch issue11303.diff. I don't know who changed the encoding's package normalize_encoding() function (wasn't me), but it's a really slow implementation.

[issue11321] 9th import of module _pickle always crashes

2011-02-25 Thread Palm Kevin
Changes by Palm Kevin kevin.p...@labsolution.lu: -- versions: +Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11321 ___ ___

[issue11322] encoding package's normalize_encoding() function is too slow

2011-02-25 Thread Marc-Andre Lemburg
New submission from Marc-Andre Lemburg m...@egenix.com: I don't know who changed the encoding's package normalize_encoding() function (wasn't me), but it's a really slow implementation. The original version used the .translate() method which is a lot faster and can be adapted to work with the

[issue11303] b'x'.decode('latin1') is much slower than b'x'.decode('latin-1')

2011-02-25 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com added the comment: Marc-Andre Lemburg wrote: I don't know who changed the encoding's package normalize_encoding() function (wasn't me), but it's a really slow implementation. The original version used the .translate() method which is a lot faster. I

[issue10743] 3.2's sysconfig doesn't work with virtualenv

2011-02-25 Thread Barry A. Warsaw
Barry A. Warsaw ba...@python.org added the comment: On Feb 25, 2011, at 01:16 PM, Palm Kevin wrote: I think that this issue needs to be reopened... since it never has been resolved... I just downloaded the new version of Python 3.2 and tried to compile, install and use it on Redhat Linux.

[issue11322] encoding package's normalize_encoding() function is too slow

2011-02-25 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +belopolsky, ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11322 ___ ___

  1   2   3   >