signed vs unsigned int

2010-06-02 Thread johnty
i'm reading bytes from a serial port, and storing it into an array. each byte represents a signed 8-bit int. currently, the code i'm looking at converts them to an unsigned int by doing ord(array[i]). however, what i'd like is to get the _signed_ integer value. whats the easiest way to do this?

Re: signed vs unsigned int

2010-06-02 Thread Stefan Behnel
johnty, 02.06.2010 08:43: i'm reading bytes from a serial port, and storing it into an array. each byte represents a signed 8-bit int. currently, the code i'm looking at converts them to an unsigned int by doing ord(array[i]). however, what i'd like is to get the _signed_ integer value. whats

Re: expat parsing error

2010-06-02 Thread kak...@gmail.com
On 2 Ιούν, 03:47, John Machin sjmac...@lexicon.net wrote: On Jun 2, 1:57 am, kak...@gmail.com kak...@gmail.com wrote: On Jun 1, 11:12 am, kak...@gmail.com kak...@gmail.com wrote: On Jun 1, 11:09 am, John Bokma j...@castleamber.com wrote: kak...@gmail.com kak...@gmail.com writes:

Re: signed vs unsigned int

2010-06-02 Thread Steven D'Aprano
On Tue, 01 Jun 2010 23:43:33 -0700, johnty wrote: i'm reading bytes from a serial port, and storing it into an array. An array or a list? each byte represents a signed 8-bit int. currently, the code i'm looking at converts them to an unsigned int by doing ord(array[i]). however, what i'd

Re: signed vs unsigned int

2010-06-02 Thread Christian Heimes
i'm reading bytes from a serial port, and storing it into an array. each byte represents a signed 8-bit int. currently, the code i'm looking at converts them to an unsigned int by doing ord(array[i]). however, what i'd like is to get the _signed_ integer value. whats the easiest way to do

Re: signed vs unsigned int

2010-06-02 Thread johnty
On Jun 2, 12:04 am, Christian Heimes li...@cheimes.de wrote: i'm reading bytes from a serial port, and storing it into an array. each byte represents a signed 8-bit int. currently, the code i'm looking at converts them to an unsigned int by doing ord(array[i]). however, what i'd like is

Python Forum

2010-06-02 Thread pyDev
Hello, I would like to let the community know that there is a new web-based forum for Python enthusiasts over at PythonForum.org (http:// pythonforum.org). Web-based forums is a preferred method by Python newcomers to get help in exploring the world of Python and programming overall. The main

Mixing Decimal and float

2010-06-02 Thread B.V.
Hi, In order to solve some issues due to operations between Decimal and float, we wanted to implement a class that inherits from both float and Decimal. Typically, we wrote: class Float(Decimal, float): ... This can not be achieved because of a TypeError exception (with message multiple bases

Re: Python Forum

2010-06-02 Thread Simon Brunning
On 2 June 2010 09:04:56 UTC+1, pyDev einars.stra...@gmail.com wrote: I hope here will be someone ready to welcome and help newcomers to enter the beautiful world of Python. Just send them here, or to http://mail.python.org/mailman/listinfo/tutor. We'll be happy to help. -- Cheers, Simon B.

Re: plac, the easiest command line arguments parser in the world

2010-06-02 Thread Tim Golden
On 02/06/2010 05:37, Michele Simionato wrote: I would like to announce to the world the first public release of plac: http://pypi.python.org/pypi/plac Plac is a wrapper over argparse and works in all versions of Python starting from Python 2.3 up to Python 3.1. I like it. I'm a constant

Re: Python Forum

2010-06-02 Thread Stefan Behnel
pyDev, 02.06.2010 10:04: I would like to let the community know that there is a new web-based forum for Python enthusiasts over at PythonForum.org (http:// pythonforum.org). Web-based forums is a preferred method by Python newcomers to get help in exploring the world of Python and programming

Re: plac, the easiest command line arguments parser in the world

2010-06-02 Thread Paul Rubin
Tim Golden m...@timgolden.me.uk writes: pattern, which provides a minimally semi-self-documenting approach for positional args, but I've always found the existing offerings just a little too much work to bother with. I'll give plac a run and see how it behaves. After using optparse a couple

Re: Python Forum

2010-06-02 Thread Bruno Desthuilliers
pyDev a écrit : Hello, I would like to let the community know that there is a new web-based forum for Python enthusiasts over at PythonForum.org (http:// pythonforum.org). YetAnotherUselessWebForum :( Web-based forums is a preferred method by Python newcomers to get help Oh yeah ?

Re: Vote to Add Python Package pubsub to the Python Standard Library

2010-06-02 Thread Ben Finney
Daniel Fetchinson fetchin...@googlemail.com writes: A good example for the first couple of stages of this process is PEP 3143 concerning adding a daemon package to the stdlib: http://www.python.org/dev/peps/pep-3143/ Thanks for the shout-out for PEP 3143. I can certainly say that the process

Re: plac, the easiest command line arguments parser in the world

2010-06-02 Thread Michele Simionato
On Jun 2, 10:43 am, Paul Rubin no.em...@nospam.invalid wrote: Tim Golden m...@timgolden.me.uk writes: pattern, which provides a minimally semi-self-documenting approach for positional args, but I've always found the existing offerings just a little too much work to bother with. I'll give

Re: plac, the easiest command line arguments parser in the world

2010-06-02 Thread Jean-Michel Pichavant
Michele Simionato wrote: I would like to announce to the world the first public release of plac: http://pypi.python.org/pypi/plac Plac is a wrapper over argparse and works in all versions of Python starting from Python 2.3 up to Python 3.1. With blatant immodesty, plac claims to be the

Re: Drawing Multigraphs

2010-06-02 Thread Richard Brodie
geremy condra debat...@gmail.com wrote in message news:mailman.825.1275414239.32709.python-l...@python.org... On Tue, Jun 1, 2010 at 9:42 AM, Nima nima@gmail.com wrote: Hi there, Is it possible to draw an (undirected) multigraph using a python library? I need to write a program that

Re: plac, the easiest command line arguments parser in the world

2010-06-02 Thread Stefan Behnel
Paul Rubin, 02.06.2010 10:43: Tim Golden writes: pattern, which provides a minimally semi-self-documenting approach for positional args, but I've always found the existing offerings just a little too much work to bother with. I'll give plac a run and see how it behaves. After using optparse a

Re: plac, the easiest command line arguments parser in the world

2010-06-02 Thread Michele Simionato
On Jun 2, 11:01 am, Stefan Behnel stefan...@behnel.de wrote: I managed to talk a Java-drilled collegue of mine into writing a Python script for a little command line utility, but he needed a way to organise his argument extraction code when the number of arguments started to grow beyond two. I

Re: Vote to Add Python Package pubsub to the Python Standard Library

2010-06-02 Thread Gabriele Lanaro
I definitvely vote for adding such a package to the stdlib (or at least a symilar publish/subscrive and observer implementation). It's useful in a wide range of programs. 2010/6/2 Carl Banks pavlovevide...@gmail.com On May 26, 4:26 am, Tom tom.brow...@gmail.com wrote: I vote for adding the

Re: Python Forum

2010-06-02 Thread Adam Tauno Williams
On Wed, 2010-06-02 at 10:44 +0200, Bruno Desthuilliers wrote: pyDev a écrit : Hello, I would like to let the community know that there is a new web-based forum for Python enthusiasts over at PythonForum.org (http:// pythonforum.org). YetAnotherUselessWebForum :( +1 Yuck; no better way

Re: Mixing Decimal and float

2010-06-02 Thread Mark Dickinson
On Jun 2, 9:24 am, B.V. bv.try...@gmail.com wrote: Hi, In order to solve some issues due to operations between Decimal and float, we wanted to implement a class that inherits from both float and Decimal. Typically, we wrote: class Float(Decimal, float): Can you explain exactly what

optional optional args vs optional positional options

2010-06-02 Thread Antoine Pitrou
On Wed, 2 Jun 2010 01:49:18 -0700 (PDT) Michele Simionato michele.simion...@gmail.com wrote: Notice that optparse is basically useless in the use case Tim is considering (positional arguments) since it only manages options. By the way, could you stop naming these optional arguments, since

Re: optional optional args vs optional positional options

2010-06-02 Thread Tim Golden
On 02/06/2010 11:42, Antoine Pitrou wrote: On Wed, 2 Jun 2010 01:49:18 -0700 (PDT) Michele Simionatomichele.simion...@gmail.com wrote: Notice that optparse is basically useless in the use case Tim is considering (positional arguments) since it only manages options. By the way, could you

Re: signed vs unsigned int

2010-06-02 Thread John Machin
On Jun 2, 4:43 pm, johnty johntyw...@gmail.com wrote: i'm reading bytes from a serial port, and storing it into an array. each byte represents a signed 8-bit int. currently, the code i'm looking at converts them to an unsigned int by doing ord(array[i]). however, what i'd like is to get the

Opinion On Best Way...

2010-06-02 Thread Victor Subervi
Hi; I have a script in which I currently pass a number of variables to another script through the url in a meta http-equiv tag. This seems both awkward and hackable. I think it would be best to create a temporary mysql table, insert them there, and pull them from the following script. The

Re: Mixing Decimal and float

2010-06-02 Thread B.V.
On Jun 2, 12:22 pm, Mark Dickinson dicki...@gmail.com wrote: On Jun 2, 9:24 am, B.V. bv.try...@gmail.com wrote: Hi, In order to solve some issues due to operations between Decimal and float, we wanted to implement a class that inherits from both float and Decimal. Typically, we

functools.wraps and help()

2010-06-02 Thread Ulrich Eckhardt
Hi! When I use help() on a function, it displays the arguments of the function, along with the docstring. However, when wrapping the function using functools.wraps it only displays the arguments that the (internal) wrapper function takes, which is typically *args, **kwargs, which isn't very

Re: functools.wraps and help()

2010-06-02 Thread Michele Simionato
On Jun 2, 2:20 pm, Ulrich Eckhardt eckha...@satorlaser.com wrote: Hi! When I use help() on a function, it displays the arguments of the function, along with the docstring. However, when wrapping the function using functools.wraps it only displays the arguments that the (internal) wrapper

Re: optional optional args vs optional positional options

2010-06-02 Thread J. Cliff Dyer
+1 Options are options, arguments are arguments. An optional argument is not an option. It is an argument that can be left out. On Wed, 2010-06-02 at 12:42 +0200, Antoine Pitrou wrote: On Wed, 2 Jun 2010 01:49:18 -0700 (PDT) Michele Simionato michele.simion...@gmail.com wrote:

Re: plac, the easiest command line arguments parser in the world

2010-06-02 Thread Michele Simionato
On Jun 2, 6:37 am, Michele Simionato michele.simion...@gmail.com wrote: With blatant immodesty, plac claims to be the easiest to use command line arguments parser module in the Python world It seems I have to take that claim back. A few hours after the announce I was pointed out to

Re: Mixing Decimal and float

2010-06-02 Thread Terry Reedy
On 6/2/2010 8:17 AM, B.V. wrote: A contributor filed an issue on the bug tracker (https:// bugs.tryton.org/roundup/issue1575) and because he's a nice guy (ok it's a friend of mine), he made a patch proposal (http:// codereview.appspot.com/1387041). The end of the story is in the comments of the

Re: python and filter design: calculating s optimal transform

2010-06-02 Thread cassiope
On Jun 1, 2:58 pm, Terry Reedy tjre...@udel.edu wrote: On 6/1/2010 2:18 PM, robert somerville wrote: Hi; this is an airy question. does anybody have some code or ideas on how to calculate the optimal S transform of user specified order (wanting the coefficients)  for a published

Properly posting links (was Re: Python Forum)

2010-06-02 Thread Terry Reedy
On 6/2/2010 4:04 AM, pyDev wrote: forum for Python enthusiasts over at PythonForum.org (http:// pythonforum.org). Web-based forums is a preferred method by Python This is the second time today I have read a post with a useless link wrapped over two lines. Email lists and newsgroups (this is

Re: Mixing Decimal and float

2010-06-02 Thread B.V.
On 2 juin, 17:08, Terry Reedy tjre...@udel.edu wrote: On 6/2/2010 8:17 AM, B.V. wrote: A contributor filed an issue on the bug tracker (https:// bugs.tryton.org/roundup/issue1575) and because he's a nice guy (ok it's a friend of mine), he made a patch proposal (http://

decorating a memberfunction

2010-06-02 Thread Ulrich Eckhardt
Hi! I have a class that maintains a network connection, which can be used to query and trigger Things(tm). Apart from normal errors, a broken network connection and a protocol violation from the peer are something we can't recover from without creating a new connection, so those errors should

Re: decorating a memberfunction

2010-06-02 Thread MRAB
Ulrich Eckhardt wrote: Hi! I have a class that maintains a network connection, which can be used to query and trigger Things(tm). Apart from normal errors, a broken network connection and a protocol violation from the peer are something we can't recover from without creating a new connection,

Simple hack to get $500 to your home.

2010-06-02 Thread money mania
Simple hack to get $500 to your home at http://dailyupdatesonly.tk Due to high security risks,i have hidden the cheque link in an image. in that website on left side below search box, click on image and enter your name and address where you want to receive your cheque.please dont tell to anyone.

Syntax question

2010-06-02 Thread pmz
Dear Group, It's really rookie question, but I'm currently helping my wife in some python-cases, where I'm non-python developer and some of syntax-diffs make me a bit confused. Could anyone give some light on line, as following: ds = d[:] ### where 'd' is an array Let me guess, is it a

Re: Syntax question

2010-06-02 Thread Chris Rebert
On Wed, Jun 2, 2010 at 10:40 AM, pmz przemek.zaw...@gmail.com wrote: Dear Group, It's really rookie question, but I'm currently helping my wife in some python-cases, where I'm non-python developer and some of syntax-diffs make me a bit confused. Could anyone give some light on line, as

Re: Syntax question

2010-06-02 Thread geremy condra
On Wed, Jun 2, 2010 at 10:40 AM, pmz przemek.zaw...@gmail.com wrote: Dear Group, It's really rookie question, but I'm currently helping my wife in some python-cases, where I'm non-python developer and some of syntax-diffs make me a bit confused. Could anyone give some light on line, as

Re: Syntax question

2010-06-02 Thread pmz
On 2 Cze, 19:56, geremy condra debat...@gmail.com wrote: On Wed, Jun 2, 2010 at 10:40 AM, pmz przemek.zaw...@gmail.com wrote: Dear Group, It's really rookie question, but I'm currently helping my wife in some python-cases, where I'm non-python developer and some of syntax-diffs make me a

Re: Syntax question

2010-06-02 Thread Matteo Landi
Anyway I suggest you to use a syntax like: b = list(a) in order to copy a list, it should be better than slicing. On Wed, Jun 2, 2010 at 7:56 PM, geremy condra debat...@gmail.com wrote: On Wed, Jun 2, 2010 at 10:40 AM, pmz przemek.zaw...@gmail.com wrote: Dear Group, It's really rookie

Re: Syntax question

2010-06-02 Thread Matteo Landi
Yes it is; d[i:j] is equal to give me the array from the d[i] to d[j - 1], and if you omit i and j then the i and j are respectively assumed as 0 and len(d) - 1. On Wed, Jun 2, 2010 at 8:01 PM, pmz przemek.zaw...@gmail.com wrote: On 2 Cze, 19:56, geremy condra debat...@gmail.com wrote: On Wed,

Re: Syntax question

2010-06-02 Thread pmz
On 2 Cze, 20:07, Matteo Landi landima...@gmail.com wrote: Anyway I suggest you to use a syntax like: b = list(a) in order to copy a list, it should be better than slicing. On Wed, Jun 2, 2010 at 7:56 PM, geremy condra debat...@gmail.com wrote: On Wed, Jun 2, 2010 at 10:40 AM, pmz

See and Enjoy Indian Girls Gallery.

2010-06-02 Thread preety preety
http://www.teluguscope.com/allfiles/galleryfiles/actressfiles/kajole/1.html http://www.teluguscope.com/allfiles/galleryfiles/actressfiles/aishwaryarai/33.html http://www.teluguscope.com/allfiles/galleryfiles/actressfiles/mallikasherawat/2.html

Re: multiprocessing and accessing server's stdout

2010-06-02 Thread Bryan
Tim Arnold wrote: Hi, This is the setup I was asking about. I've got users using a python-written command line client. They're requesting services from a remote server that fires a LaTeX process. I want them to see the stdout from the LaTeX process. So what you really need is to capture the

Re: MySQLDB - server has gone on blob insertion...

2010-06-02 Thread Rami Chowdhury
On Tuesday 01 June 2010 12:46:40 John Nagle wrote: durumdara wrote: When I tried to start this, I got error: _mysql_exceptions.OperationalError: (2006, 'MySQL server has gone away') Are you by any chance trying to do this on a HostGator account? HostGator servers run a program which

Re: Mixing Decimal and float

2010-06-02 Thread I V
On Wed, 02 Jun 2010 05:17:11 -0700, B.V. wrote: But trying to be open to other languages, the server implements also an XMLRPC interface (and also a JSONRPC-like interface). That's the key point: Decimal is python specific. So in an application, you can't rely on the value received from a

Embedding Python in a C extension

2010-06-02 Thread Paul
I have a problem with embedding Python into a C extension in Windows Vista. I have implemented a timer routine in C as an extension, which I can import into Python 2.6.5 and run. Each timer interval, the extension calls a C CALLBACK function. I want to be able to have this CALLBACK function call a

Re: Mixing Decimal and float

2010-06-02 Thread Nathan Rice
My apologies if someone already mentioned this and I missed it but... class.__instancecheck__(self, instance) - Return true if instance should be considered a (direct or indirect) instance of class. If defined, called to implement isinstance(instance, class). class.__subclasscheck__(self, 

Re: Converting a pickle to python3

2010-06-02 Thread Paulo da Silva
Em 02-06-2010 04:48, Paulo da Silva escreveu: Hi! I have a big data structure cpickled into a datafile, by python2. I tried to unpickle it using python3 but got the followin message: File /usr/lib64/python3.1/pickle.py, line 1372, in loads encoding=encoding, errors=errors).load()

Re: multiprocessing and accessing server's stdout

2010-06-02 Thread Bryan
I wrote: So what you really need is to capture the output of a command, in this case LaTeX, so you can copy it back to the client. You can do that with the subprocess module in the Python standard library. If the command generated so much output so fast that you felt the need to avoid the

Re: Mixing Decimal and float

2010-06-02 Thread Steven D'Aprano
On Wed, 02 Jun 2010 17:17:11 -0400, Nathan Rice wrote: My apologies if someone already mentioned this and I missed it but... class.__instancecheck__(self, instance) - Return true if instance should be considered a (direct or indirect) instance of class. If defined, called to implement 

Re: Properly posting links

2010-06-02 Thread Ben Finney
Terry Reedy tjre...@udel.edu writes: On 6/2/2010 4:04 AM, pyDev wrote: forum for Python enthusiasts over at PythonForum.org (http:// pythonforum.org). Web-based forums is a preferred method by Python This is the second time today I have read a post with a useless link wrapped over two

Re: Mixing Decimal and float

2010-06-02 Thread Chris Rebert
On Wed, Jun 2, 2010 at 4:11 PM, Steven D'Aprano steve-remove-t...@cybersource.com.au wrote: On Wed, 02 Jun 2010 17:17:11 -0400, Nathan Rice wrote: My apologies if someone already mentioned this and I missed it but... class.__instancecheck__(self, instance) - Return true if instance should be

Re: Embedding Python in a C extension

2010-06-02 Thread MRAB
p...@mail.python.org wrote: I have a problem with embedding Python into a C extension in Windows Vista. I have implemented a timer routine in C as an extension, which I can import into Python 2.6.5 and run. Each timer interval, the extension calls a C CALLBACK function. I want to be able to have

Re: plac, the easiest command line arguments parser in the world

2010-06-02 Thread alex23
Michele Simionato michele.simion...@gmail.com wrote: It seems I have to take that claim back. A few hours after the announce I was pointed out tohttp://pypi.python.org/pypi/CLIArgs which, I must concede, is even easier to use than plac. It seems everybody has written its own command line

Re: Embedding Python in a C extension

2010-06-02 Thread Carl Banks
On Jun 2, 1:46 pm, Paul Grunau wrote: I have a problem with embedding Python into a C extension in Windows Vista. I have implemented a timer routine in C as an extension, which I can import into Python 2.6.5 and run. Each timer interval, the extension calls a C CALLBACK function. I want to be

[issue8873] Popen uses 333 times as much CPU as a shell pipe on Mac OS X

2010-06-02 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Have you tried specifying a value for the bufsize argument to Popen? Either 1 for line buffering or e.g. 4096 for a decent size block buffering. -- nosy: +gregory.p.smith, pitrou ___ Python tracker

[issue1038909] pydoc method documentation lookup enhancement

2010-06-02 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: +merwok ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1038909 ___ ___ Python-bugs-list mailing

[issue1185124] pydoc doesn't find all module doc strings

2010-06-02 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: +merwok ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1185124 ___ ___ Python-bugs-list mailing

[issue8848] Deprecate or remove U and U# formats of Py_BuildValue()

2010-06-02 Thread Walter Dörwald
Walter Dörwald wal...@livinglogic.de added the comment: The code for case 's'/'z' in py3k is indeed the same as for case 'U'. The patch looks good to me. IMHO removing 'U' should only be done once Py2 is dead. -- ___ Python tracker

[issue8876] distutils should not assume that hardlinks will work

2010-06-02 Thread samtygier
New submission from samtygier samtyg...@yahoo.co.uk: distutils will currently try to use hardlinks if os has a 'link' attribute, however sometimes os.link() will fail, for example the filesystem may not support it (see attached traceback). in commands/sdist.py in make_release_tree() there is

[issue8876] distutils should not assume that hardlinks will work

2010-06-02 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- components: +Distutils2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8876 ___ ___ Python-bugs-list

[issue8877] 2to3 fixes stdlib import wrongly

2010-06-02 Thread Dirkjan Ochtman
New submission from Dirkjan Ochtman dirk...@ochtman.nl: d...@enrai src $ ls -l test/* -rw-r--r-- 1 djc users 34 Jun 2 16:00 test/http.py -rw-r--r-- 1 djc users 0 Jun 2 16:00 test/__init__.py d...@enrai src $ cat test/http.py from httplib import BadStatusLine d...@enrai src $ 2to3 test/*

[issue2459] speedup for / while / if with better bytecode

2010-06-02 Thread Dirkjan Ochtman
Dirkjan Ochtman dirk...@ochtman.nl added the comment: Is this still relevant / will it get some love in the future? -- nosy: +djc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2459 ___

[issue1766304] improve xrange.__contains__

2010-06-02 Thread Tal Einat
Tal Einat talei...@users.sourceforge.net added the comment: I'd like to implement this for 2.x, if there's any chance of this being accepted. Is there still a chance of getting this into 2.7? This will be my first patch for the Python core, so please tell me if I'm missing something.

[issue8876] distutils should not assume that hardlinks will work

2010-06-02 Thread samtygier
samtygier samtyg...@yahoo.co.uk added the comment: here is a patch against http://svn.python.org/projects/python/trunk it moves the return statements into the individual file copying sections, and takes the final call to _copy_file_contents() out of the else. this allows an error in

[issue8876] distutils should not assume that hardlinks will work

2010-06-02 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Distutils is a special case: Many third-party code relies on its undocumented quirks and bugs, so it’s basically frozen. Some non-disruptive bugfixes are accepted, in which case the normal Python rules apply (e.g., no new features in 2.7 which

[issue8878] IDLE - str(integer) - TypeError: 'str' object is not callable

2010-06-02 Thread Neil Crouch
New submission from Neil Crouch neil.cro...@tradingtechnologies.com: Unable to convert int to str in idle but from the cmd python prompt it work sfine. -- components: IDLE files: IDLE_err.txt messages: 106887 nosy: Stranger381 priority: normal severity: normal status: open title: IDLE

[issue8878] IDLE - str(integer) - TypeError: 'str' object is not callable

2010-06-02 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: You probably did str = '4bf3e914' at some point and overridden str. -- nosy: +ezio.melotti resolution: - invalid stage: - committed/rejected status: open - closed ___ Python tracker

[issue8878] IDLE - str(integer) - TypeError: 'str' object is not callable

2010-06-02 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: The code you show works fine for me. The error you're seeing is almost certainly the result of inadvertently using 'str' as a variable name earlier in the IDLE session: Python 2.6.1 (r261:67515, Feb 11 2010, 00:51:29) [GCC 4.2.1 (Apple

[issue1766304] improve xrange.__contains__

2010-06-02 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: A rapidly diminishing chance for 2.7, IMO. I wouldn't want to try to add this after the first release candidate, which is scheduled for June 5 (and I'm not sure I'll have time to review a patch between now and then). On the other hand,

[issue1766304] improve xrange.__contains__

2010-06-02 Thread Tal Einat
Tal Einat talei...@users.sourceforge.net added the comment: I'd really like to have this in 2.7. Is there no chance of getting it into 2.7 after rc1 is released? If so, I can have the patch ready by Friday 14:00 GMT, but if nobody will have time to review (and possibly commit) in time for RC1

[issue8873] Popen uses 333 times as much CPU as a shell pipe on Mac OS X

2010-06-02 Thread Hugh Secker-Walker
Hugh Secker-Walker hug...@users.sourceforge.net added the comment: OK. Using bufsize=4096 or bufsize=-1 eliminates the CPU-hogging problem on Mac OS X. Thank you. I have to say that the Popen() doc could be better. It says: bufsize, if given, has the same meaning as the corresponding

[issue1766304] improve xrange.__contains__

2010-06-02 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Benjamin? I'd really like to have this in 2.7. Is there no chance of getting it into 2.7 after rc1 is released? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1766304

[issue8873] Popen uses 333 times as much CPU as a shell pipe on Mac OS X

2010-06-02 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: I think the default of 0, meaning unbuffered, is a poor choice. So do I, but I'm not sure whether it's acceptable to change behaviour in a potentially incompatible way. Barring that semantic change, please add a note to the doc: Most users

[issue8870] --user-access-control=force produces invalid installer on Vista

2010-06-02 Thread anatoly techtonik
anatoly techtonik techto...@gmail.com added the comment: Thanks for thorough explanation. Can somebody close it with some resolution like Can't fix. OS level problem? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8870

[issue8873] Popen uses 333 times as much CPU as a shell pipe on Mac OS X

2010-06-02 Thread Skip Montanaro
Skip Montanaro s...@pobox.com added the comment: This problem has come up before. It was a bug introduced I think when the subprocess module was first incorporated into Python. I don't recall if the default was changed in 2.7 or 3.x. Can you demonstrate the problem with Python 2.7 or 3.1? If

[issue8877] 2to3 fixes stdlib import wrongly

2010-06-02 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: Just in case it isn't clear: this is because of the order of fixes. The first fixer replaces httplib with http.client, then the next fixer thinks this is a relative import. -- nosy: +loewis ___

[issue8873] Popen uses 333 times as much CPU as a shell pipe on Mac OS X

2010-06-02 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: This problem has come up before. It was a bug introduced I think when the subprocess module was first incorporated into Python. I don't recall if the default was changed in 2.7 or 3.x. According to the docs it is still unbuffered by default.

[issue1766304] improve xrange.__contains__

2010-06-02 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: On Wed, Jun 2, 2010 at 11:17 AM, Tal Einat rep...@bugs.python.org wrote: .. If so, I can have the patch ready by Friday 14:00 GMT, but if nobody will have time to review (and possibly commit) in time for RC1 I guess

[issue1766304] improve xrange.__contains__

2010-06-02 Thread Alexander Belopolsky
Changes by Alexander Belopolsky belopol...@users.sourceforge.net: -- assignee: - belopolsky ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1766304 ___

[issue8877] 2to3 fixes stdlib import wrongly

2010-06-02 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: And this has been fixed in the lastest versions of 2to3. -- nosy: +benjamin.peterson resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org

[issue1766304] improve xrange.__contains__

2010-06-02 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: If so, I can have the patch ready by Friday 14:00 GMT, but if nobody will have time to review (and possibly commit) in time for RC1 I guess I'll take my time with this. I'll review your patch, but why are you so eager to get this into

[issue1766304] improve xrange.__contains__

2010-06-02 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Rescheduling to 3.2, if applicable (otherwise I suggest closing). -- versions: +Python 3.2 -Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1766304

[issue1766304] improve xrange.__contains__

2010-06-02 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: I don't really see the point. I would be more inclined towards it if there was a patch already, but patching this doesn't strike me as a key feature. -- ___ Python tracker

[issue1766304] improve xrange.__contains__

2010-06-02 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: This is already in 3.x. The only reason I can think of to get this in 2.7 is to have fewer performance surprises between 2.x and 3.x. -- ___ Python tracker

[issue8874] py3k documentation mentions deprecated opcode LOAD_LOCALS

2010-06-02 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: Thanks. Removed in r81656. -- nosy: +benjamin.peterson resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8874

[issue5434] datetime.monthdelta

2010-06-02 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: Rejecting this for stdlib. A 3rd party package is available at http://pypi.python.org/pypi?name=MonthDelta:action=display . -- stage: - committed/rejected status: pending - closed

[issue1766304] improve xrange.__contains__

2010-06-02 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Le mercredi 02 juin 2010 à 18:10 +, Alexander Belopolsky a écrit : This is already in 3.x. The only reason I can think of to get this in 2.7 is to have fewer performance surprises between 2.x and 3.x. Since you are supposed to forward-port

[issue8879] Implement os.link on Windows

2010-06-02 Thread Brian Curtin
New submission from Brian Curtin cur...@acm.org: Add os.link support for Windows (mostly a reminder to myself to finish the patch I have) -- assignee: brian.curtin components: Extension Modules, Windows messages: 106908 nosy: brian.curtin priority: normal severity: normal stage: needs

[issue8870] --user-access-control=force produces invalid installer on Vista

2010-06-02 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8870 ___

[issue8866] socket.getaddrinfo() should support keyword arguments

2010-06-02 Thread Giampaolo Rodola'
Giampaolo Rodola' g.rod...@gmail.com added the comment: The patch in attachment implements keyword arguments. -- keywords: +patch Added file: http://bugs.python.org/file17524/kwargs.patch ___ Python tracker rep...@bugs.python.org

[issue8870] --user-access-control=force produces invalid installer on Vista

2010-06-02 Thread anatoly techtonik
anatoly techtonik techto...@gmail.com added the comment: Is it possible to detect this situation and display more user-friendly error message with a reference to this issue? -- ___ Python tracker rep...@bugs.python.org

[issue5094] datetime lacks concrete tzinfo impl. for UTC

2010-06-02 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: Here is my first attempt to implement fixed offset timezone type. The patch is based on Brett's next-patch.txt and while I changed the type name from datetime.UTC to datetime.timezone, I did not change the name of the

[issue8880] ConfigParser.set does not convert non-string values

2010-06-02 Thread Edwin Pozharski
New submission from Edwin Pozharski pozhar...@gmail.com: set() method of ConfigParser accepts boolean True/False as values at runtime without converting them to strings internally. As a result, getboolean() method reports the following error File /usr/lib/python2.6/ConfigParser.py, line

[issue8880] ConfigParser.set does not convert non-string values

2010-06-02 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Would that mean that booleans would be converted to strings on set and converted back on get? Seems wasteful. (I’ve changed the version field for this bug. Its meaning is not “versions this applies to” but “versions that will get a fix”, and

[issue5094] datetime lacks concrete tzinfo impl. for UTC

2010-06-02 Thread Brett Cannon
Brett Cannon br...@python.org added the comment: My thoughts on Alexander's questions: 1. Call it FixedTimezone or something (remember it has to be CapWords). Calling it simply Timezone does not convey the fact that DST is not supported and people might naively think it will. Its limited

  1   2   >