Re: webapp development in pure python

2011-10-27 Thread 88888 Dihedral
OK, lets start a framework in using python in the server side and the client side. (1). requirements of the server side first: 1. sending HTML, XML documents to be displayed in the browsers of the clients and receiving for user inputs are easy in modpython, django, and etc. 2.

Philosophical Python: 2*b or not 2*b

2011-10-27 Thread Andreas Neudecker
Not the answers I expected: ;-) b = True 2*b or not 2*b 2 b = False 2*b or not 2*b True It all becomes clear when you look at: b = False 2*b 0 b = True 2*b 2 No surprise there really. But fun anyway. Any more philsophical Python code out there? --

Genehmigt vom Ministerium für alberne Gangarten

2011-10-27 Thread Andreas Neudecker
http://blog.stuttgarter-zeitung.de/fundstucke/2011/10/27/genehmigt-vom-ministerium-fur-alberne-gangarten/ -- http://mail.python.org/mailman/listinfo/python-list

Problem using execvp

2011-10-27 Thread faucheuse
Hi, I'm trying to launch my python program with another process name than python.exe. In order to do that I'm trying to use the os.execvp function : os.execvp(./Launch.py, [ProcessName]) Launch.py is the file that Launch the program and ProcessName is the ... Process Name ^^ I get this error :

Presenting recursive dict (json_diff)

2011-10-27 Thread mcepl
Hi, I have here a simple script (https://gitorious.org/json_diff/mainline) which makes a diff between two JSON files. So for JSON objects { a: 1, b: 2, son: { name: Janošek } } and { a: 2, c: 3, daughter: { name: Maruška } } it generates {

Re: Presenting recursive dict (json_diff)

2011-10-27 Thread mcepl
On 27 říj, 10:50, mcepl mc...@redhat.com wrote: Hi, I have here a simple script (https://gitorious.org/json_diff/mainline) which makes a diff between two JSON files. So for JSON objects and I have completely burried to lead on this. The point is that the resulting object can be endlessly

Re: Problem using execvp

2011-10-27 Thread Hans Mulder
On 27/10/11 10:57:55, faucheuse wrote: I'm trying to launch my python program with another process name than python.exe. Which version of Python are you using? Which version of which operating system? In order to do that I'm trying to use the os.execvp function : os.execvp(./Launch.py,

python logging multiple processes to one file (via socket server)

2011-10-27 Thread Gelonida N
Hi, I have a rather 'simple' problem. Logging from multiple processes to the same file AND be sure, that no log message is lost, 1.) Log multiple processes to one file: -- I have a python program, which I want to log, but which forks several times.

__dict__ attribute for built-in types

2011-10-27 Thread candide
I realize that built-in types objects don't provide a __dict__ attribute and thereby i can't set an attribute to a such object, for instance a=[42,421] a.foo=bar Traceback (most recent call last): File stdin, line 1, in module AttributeError: 'list' object has no attribute 'foo'

Re: spawnl issues with Win 7 access rights

2011-10-27 Thread Propad
Hello Gentelmen, the suggestion to add the optional second parameter fixed the problem, spawnl now works on the Win 7 computer I'm responsible for (with Python 2.2). So the suggested cause seems to be right. Thank you for the great help! Cheers, Nenad On 26 Okt., 21:20, Terry Reedy

Re: spawnl issues with Win 7 access rights

2011-10-27 Thread Tim Golden
On 27/10/2011 11:27, Propad wrote: the suggestion to add the optional second parameter fixed the problem, spawnl now works on the Win 7 computer I'm responsible for (with Python 2.2). So the suggested cause seems to be right. FWIW, although it's not obvious, the args parameter to spawnl is

Re: Problem using execvp

2011-10-27 Thread James Housden
On Oct 27, 11:27 am, Hans Mulder han...@xs4all.nl wrote: On 27/10/11 10:57:55, faucheuse wrote: I'm trying to launch my python program with another process name than python.exe. Which version of Python are you using? Which version of which operating system? In order to do that I'm

Re: __dict__ attribute for built-in types

2011-10-27 Thread Arnaud Delobelle
On 27 October 2011 11:08, candide candide@free.invalid wrote: I realize that built-in types objects don't provide a __dict__ attribute and thereby i can't set an attribute to a such object, for instance a=[42,421] a.foo=bar Traceback (most recent call last):  File stdin, line 1, in module

Re: __dict__ attribute for built-in types

2011-10-27 Thread Duncan Booth
candide candide@free.invalid wrote: I realize that built-in types objects don't provide a __dict__ attribute and thereby i can't set an attribute to a such object, for instance a=[42,421] a.foo=bar Traceback (most recent call last): File stdin, line 1, in module AttributeError:

Re: Forking simplejson

2011-10-27 Thread Paul Kölle
Am 26.10.2011 19:34, schrieb Nathan Rice: Since this happily went off to the wrong recipient the first time... The python json module/simpljson are badly in need of an architecture update. The fact that you can't override the encode method of JSONEncoder and have it work reliably without

Re: __dict__ attribute for built-in types

2011-10-27 Thread Chris Angelico
On Thu, Oct 27, 2011 at 10:03 PM, Duncan Booth duncan.booth@invalid.invalid wrote: Types without a __dict__ use less memory. Also, if you couldn't have a type that didn't have a `__dict__` then any `dict` would also need its own `__dict__` which would either result in infinite memory use or

Re: Forking simplejson

2011-10-27 Thread Amirouche Boubekki
+---+---+ | Python protocol | JSON | | or special case | | +===+=**==+ | (ø) __json__ | see (ø) | +---+-**--| | map | object| I am curious what you mean by the 'map' protocol.

[ANN] pyKook 0.6.0 - task automation tool for Python, similar to Rake or Ant

2011-10-27 Thread Makoto Kuwata
Hi, I have released pyKook 0.6.0. http://pypi.python.org/pypi/Kook/0.6.0 http://www.kuwata-lab.com/kook/ http://www.kuwata-lab.com/kook/pykook-users-guide.html In this release, a lot of enhancements are introduced. pyKook Overview --- pyKook is a task automation tool for Python,

Re: __dict__ attribute for built-in types

2011-10-27 Thread candide
Le 27/10/2011 13:03, Duncan Booth a écrit : -- where the official documentation refers to this point ? See http://docs.python.org/reference/datamodel.html for the docs about __slots__ There is also the API documentation which describes at a low level how to control whether or not instances

Re: Forking simplejson

2011-10-27 Thread Chris Rebert
On Thu, Oct 27, 2011 at 6:55 AM, Amirouche Boubekki amirouche.boube...@gmail.com wrote: +---+---+ | Python protocol | JSON | | or special case | | +===+===+ | (ø) __json__ | see (ø) | +---+---|      | map  

Re: Forking simplejson

2011-10-27 Thread Chris Rebert
On Wed, Oct 26, 2011 at 2:14 AM, Amirouche Boubekki amirouche.boube...@gmail.com wrote: Héllo, I would like to fork simplejson [1] and implement serialization rules based on protocols instead of types [2], plus special cases for protocol free objects, that breaks compatibility. The benefit

Re: inserting \ in regular expressions

2011-10-27 Thread John Roth
On Oct 26, 2:47 pm, Dave Angel d...@davea.name wrote: On 10/26/2011 03:48 PM, Ross Boylan wrote: I want to replace every \ and (the two characters for backslash and double quotes) with a \ and the same character, i.e., \ -  \\ -  \ I have not been able to figure out how to do

Re: __dict__ attribute for built-in types

2011-10-27 Thread Duncan Booth
Chris Angelico ros...@gmail.com wrote: On Thu, Oct 27, 2011 at 10:03 PM, Duncan Booth duncan.booth@invalid.invalid wrote: Types without a __dict__ use less memory. Also, if you couldn't have a type that didn't have a `__dict__` then any `dict` would also need its own `__dict__` which would

Re: Forking simplejson

2011-10-27 Thread Amirouche Boubekki
2011/10/27 Chris Rebert c...@rebertia.com On Wed, Oct 26, 2011 at 2:14 AM, Amirouche Boubekki amirouche.boube...@gmail.com wrote: Héllo, I would like to fork simplejson [1] and implement serialization rules based on protocols instead of types [2], plus special cases for protocol free

Re: Philosophical Python: 2*b or not 2*b

2011-10-27 Thread John Ladasky
On Oct 27, 1:11 am, Andreas Neudecker zap...@gmx.net wrote: Any more philsophical Python code out there? That is the question. -- http://mail.python.org/mailman/listinfo/python-list

Re: __dict__ attribute for built-in types

2011-10-27 Thread Amirouche Boubekki
2011/10/27 candide candide@free.invalid I realize that built-in types objects don't provide a __dict__ attribute and thereby i can't set an attribute to a such object, for instance a=[42,421] a.foo=bar Traceback (most recent call last): File stdin, line 1, in module AttributeError:

Re: __dict__ attribute for built-in types

2011-10-27 Thread Amirouche Boubekki
But beside this, how to recognise classes whose object doesn't have a __dict__ attribute ? Why do you need to access __dict__ ? maybe dir is enough see the other message -- http://mail.python.org/mailman/listinfo/python-list

Re: python logging multiple processes to one file (via socket server)

2011-10-27 Thread Vinay Sajip
On Oct 27, 11:09 am, Gelonida N gelon...@gmail.com wrote: The following section documents this approach in more detail and includes a working socket receiver which can be used as a starting point for you to adapt in your own applications. Somehow I have a mental block though and fail to see

xmlrpclib threadsafe?

2011-10-27 Thread quarterlife
I need to talk to an xmlrpc server. I open one connection and then create a pile of threads communicating to that server. Based on some limited testing, it seems to work really well. The next step is to turn it into a pool. But before I continue, the question is: Does anyone know if the

Re: python logging multiple processes to one file (via socket server)

2011-10-27 Thread bobicanprogram
On Oct 27, 6:09 am, Gelonida N gelon...@gmail.com wrote: Hi, I have a rather 'simple' problem. Logging from multiple processes to the same file AND be sure, that no log message is lost, 1.) Log multiple processes to one file: -- I have a python

Re: python logging multiple processes to one file (via socket server)

2011-10-27 Thread 88888 Dihedral
Well, please check the byte code compiled results. This is useful. I know that a lot people are working on increasing the speed of execution scripts written in python, say, psyco, pyrex for packages released! -- http://mail.python.org/mailman/listinfo/python-list

Need Windows user / developer to help with Pynguin

2011-10-27 Thread Lee Harr
I develop the free python-based turtle graphics application pynguin. http://pynguin.googlecode.com/ Lately I have been getting a lot of positive comments from people who use the program, but I am also getting a lot of feedback from people on Windows (mostly beginners) who are having trouble

Re: Need Windows user / developer to help with Pynguin

2011-10-27 Thread Andrew Berg
On 10/27/2011 2:38 PM, Lee Harr wrote: I am hoping someone can look at what is there and come up with a reliable method or a simple set of steps that people can follow to get up and running. Hopefully without having to resort to the command prompt. I started a wiki page here:

Re: Presenting recursive dict (json_diff)

2011-10-27 Thread Terry Reedy
On 10/27/2011 4:50 AM, mcepl wrote: Hi, I have here a simple script (https://gitorious.org/json_diff/mainline) which makes a diff between two JSON files. So for JSON objects { a: 1, b: 2, son: { name: Janošek } } and { a: 2, c: 3, daughter: {

Re: spawnl issues with Win 7 access rights

2011-10-27 Thread Terry Reedy
On 10/27/2011 6:36 AM, Tim Golden wrote: On 27/10/2011 11:27, Propad wrote: the suggestion to add the optional second parameter fixed the problem, spawnl now works on the Win 7 computer I'm responsible for (with Python 2.2). So the suggested cause seems to be right. FWIW, although it's not

Dynamically creating properties?

2011-10-27 Thread Andy Dingley
I have some XML, with a variable and somewhat unknown structure. I'd like to encapsulate this in a Python class and expose the text of the elements within as properties. How can I dynamically generate properties (or methods) and add them to my class? I can easily produce a dictionary of the

Re: Dynamically creating properties?

2011-10-27 Thread John Gordon
In a47fb589-520a-49ec-9864-cac1d7ea1...@s9g2000yqi.googlegroups.com Andy Dingley ding...@codesmiths.com writes: How can I dynamically generate properties (or methods) and add them to my class? I can easily produce a dictionary of the required element names and their text values, but how do I

Assigning generator expressions to ctype arrays

2011-10-27 Thread Patrick Maupin
Bug or misunderstanding? Python 2.7.1+ (r271:86832, Apr 11 2011, 18:13:53) [GCC 4.5.2] on linux2 Type help, copyright, credits or license for more information. x = 32 * [0] x[:] = (x for x in xrange(32)) from ctypes import c_uint x = (32 * c_uint)() x[:] = xrange(32) x[:] = (x for x in

Re: Presenting recursive dict (json_diff)

2011-10-27 Thread Matej Cepl
Dne 27.10.2011 21:49, Terry Reedy napsal(a): Use '_append', etc, much like namedtuple does, for the same reason. Right, done. What about the presentation issue? Any ideas? Best, Matěj -- http://mail.python.org/mailman/listinfo/python-list

Re: Dynamically creating properties?

2011-10-27 Thread DevPlayer
On Oct 27, 3:59 pm, Andy Dingley ding...@codesmiths.com wrote: I have some XML, with a variable and somewhat unknown structure. I'd like to encapsulate this in a Python class and expose the text of the elements within as properties. How can I dynamically generate properties (or methods) and

Re: __dict__ attribute for built-in types

2011-10-27 Thread Steven D'Aprano
On Thu, 27 Oct 2011 16:01:25 +0200, candide wrote: OK, thanks for the information abouts the slots. Nevertheless, this cannot answer completely my question. Some builtin types like string, lists, integer, float, dictionaries, etc have the property that instances of those types don't provide a

Re: Assigning generator expressions to ctype arrays

2011-10-27 Thread Steven D'Aprano
On Thu, 27 Oct 2011 13:34:28 -0700, Patrick Maupin wrote: Bug or misunderstanding? Python 2.7.1+ (r271:86832, Apr 11 2011, 18:13:53) [GCC 4.5.2] on linux2 Type help, copyright, credits or license for more information. x = 32 * [0] x[:] = (x for x in xrange(32)) from ctypes import c_uint

Re: __dict__ attribute for built-in types

2011-10-27 Thread Chris Angelico
On Fri, Oct 28, 2011 at 1:36 AM, Duncan Booth duncan.booth@invalid.invalid wrote: Try thinking that one through. Imagine you could set up a dictionary the way you describe A dict with itself as its own __dict__ becomes like a javascript object where subscripting and attribute access are

Re: __dict__ attribute for built-in types

2011-10-27 Thread candide
Le 28/10/2011 00:19, Steven D'Aprano a écrit : What, you think it goes against the laws of physics that nobody thought to mention it in the docs?wink No but I'm expecting from Python documentation to mention the laws of Python ... But beside this, how to recognise classes whose object

Re: __dict__ attribute for built-in types

2011-10-27 Thread Hrvoje Niksic
candide candide@free.invalid writes: But beside this, how to recognise classes whose object doesn't have a __dict__ attribute ? str, list and others aren't classes, they are types. While all (new-style) classes are types, not all types are classes. It's instances of classes (types created by

Re: Dynamically creating properties?

2011-10-27 Thread DevPlayer
Personally I like to use this function instead of a try: except: because try-except will allow names like __metaclass__. Remember, setattr(obj, attr_name, value) allows attr_name to be any valid str(). For example: '!@kdafk11', or '1_1', '1e-20', '0.0', '*one', '\n%%', etc. def

Re: Dynamically creating properties?

2011-10-27 Thread DevPlayer
At least one error: change: for astr in dir(__builtins__): to: for astr in __builtins__.__dict__: -- http://mail.python.org/mailman/listinfo/python-list

Re: __dict__ attribute for built-in types

2011-10-27 Thread candide
Le 28/10/2011 00:57, Hrvoje Niksic a écrit : was used at class definition time to suppress it. Built-in and extension types can choose whether to implement __dict__. Is it possible in the CPython implementation to write something like this : foo.bar = 42 without raising an attribute error

Re: __dict__ attribute for built-in types

2011-10-27 Thread MRAB
On 28/10/2011 00:36, candide wrote: Le 28/10/2011 00:57, Hrvoje Niksic a écrit : was used at class definition time to suppress it. Built-in and extension types can choose whether to implement __dict__. Is it possible in the CPython implementation to write something like this : foo.bar = 42

Re: Assigning generator expressions to ctype arrays

2011-10-27 Thread Patrick Maupin
On Oct 27, 5:31 pm, Steven D'Aprano steve +comp.lang.pyt...@pearwood.info wrote: From the outside, you can't tell how big a generator expression is. It has no length: I understand that. Since the array object has no way of telling whether the generator will have the correct size, it

Re: Dynamically creating properties?

2011-10-27 Thread DevPlayer
Second error def isvalid_named_reference( astring ): # varible name is really a named_reference import __builtin__# add line -- http://mail.python.org/mailman/listinfo/python-list

NLTK and package structure

2011-10-27 Thread Steven Bird
The Natural Language Toolkit (NLTK) is a suite of open source Python packages for natural language processing, available at http://nltk.org/, together with an O'Reilly book which is available online for free. Development is now hosted at http://github.com/nltk -- get it here:

Re: Problem using execvp

2011-10-27 Thread Nobody
On Thu, 27 Oct 2011 01:57:55 -0700, faucheuse wrote: I get this error : OSError : [Errno 8] Exec format error. The most likely reason for this error is a missing or invalid shebang, e.g.: #!/usr/bin/python or: #!/usr/bin/env python The #! must be the first two bytes in the

Re: __dict__ attribute for built-in types

2011-10-27 Thread Terry Reedy
On 10/27/2011 6:52 PM, candide wrote: No but I'm expecting from Python documentation to mention the laws of Python ... The details of CPython builtin classes are not laws of Python. It *is* a 'law of Python' that classes can use 'slots = ' to restrict the attributes of instances. By

Re: __dict__ attribute for built-in types

2011-10-27 Thread candide
Le 28/10/2011 02:02, MRAB a écrit : No, built-in classes written in C have certain limitations, but why would you want to do that anyway? Mainly for learning purpose and Python better understanding. Actually, I have a class of mine for drawing graphs with the Graphviz software. The

Re: __dict__ attribute for built-in types

2011-10-27 Thread alex23
On Oct 28, 8:52 am, candide cand...@free.invalid wrote: No but I'm expecting from Python documentation to mention the laws of Python ... It's not a law, it's an _implementation detail_. The docs don't tend to mention every such decision made because that's what the source is for. But beside

Re: __dict__ attribute for built-in types

2011-10-27 Thread Patrick Maupin
On Oct 27, 9:46 pm, candide cand...@free.invalid wrote: Le 28/10/2011 02:02, MRAB a crit : No, built-in classes written in C have certain limitations, but why would you want to do that anyway? Mainly for learning purpose and Python better understanding. Actually, I have a class of mine

Unicode literals and byte string interpretation.

2011-10-27 Thread Fletcher Johnson
If I create a new Unicode object u'\x82\xb1\x82\xea\x82\xcd' how does this creation process interpret the bytes in the byte string? Does it assume the string represents a utf-16 encoding, at utf-8 encoding, etc...? For reference the string is これは in the 'shift-jis' encoding. --

Re: Assigning generator expressions to ctype arrays

2011-10-27 Thread Terry Reedy
On 10/27/2011 8:09 PM, Patrick Maupin wrote: x[:] = (x for x in xrange(32)) This translates to s.__setitem__(slice(None,None), generator_object) where 'generator_object' is completely opaque, except that it will yield 0 to infinity objects in response to next() before raising StopIteration.

Re: Unicode literals and byte string interpretation.

2011-10-27 Thread David Riley
On Oct 27, 2011, at 11:05 PM, Fletcher Johnson wrote: If I create a new Unicode object u'\x82\xb1\x82\xea\x82\xcd' how does this creation process interpret the bytes in the byte string? Does it assume the string represents a utf-16 encoding, at utf-8 encoding, etc...? For reference the

Re: Unicode literals and byte string interpretation.

2011-10-27 Thread Chris Angelico
On Fri, Oct 28, 2011 at 2:05 PM, Fletcher Johnson flt.john...@gmail.com wrote: If I create a new Unicode object u'\x82\xb1\x82\xea\x82\xcd' how does this creation process interpret the bytes in the byte string? Does it assume the string represents a utf-16 encoding, at utf-8 encoding, etc...?

Re: Dynamically creating properties?

2011-10-27 Thread Lie Ryan
On 10/28/2011 08:48 AM, DevPlayer wrote: On Oct 27, 3:59 pm, Andy Dingleyding...@codesmiths.com wrote: I have some XML, with a variable and somewhat unknown structure. I'd like to encapsulate this in a Python class and expose the text of the elements within as properties. How can I

Re: Need Windows user / developer to help with Pynguin

2011-10-27 Thread Terry Reedy
On 10/27/2011 3:38 PM, Lee Harr wrote: I develop the free python-based turtle graphics application pynguin. http://pynguin.googlecode.com/ Lately I have been getting a lot of positive comments from people who use the program, but I am also getting a lot of feedback from people on Windows

Re: Presenting recursive dict (json_diff)

2011-10-27 Thread Terry Reedy
On 10/27/2011 4:58 PM, Matej Cepl wrote: Dne 27.10.2011 21:49, Terry Reedy napsal(a): Use '_append', etc, much like namedtuple does, for the same reason. Right, done. What about the presentation issue? Any ideas? No. -- Terry Jan Reedy --

Re: __dict__ attribute for built-in types

2011-10-27 Thread Nobody
On Thu, 27 Oct 2011 12:08:45 +0200, candide wrote: I realize that built-in types objects don't provide a __dict__ attribute and thereby i can't set an attribute to a such object, for instance Note that possession or absence of a __dict__ attribute doesn't necessarily mean that you can or

[issue13244] WebSocket schemes in urllib.parse

2011-10-27 Thread Jyrki Pulliainen
Jyrki Pulliainen jy...@dywypi.org added the comment: Alternative: make this bug dependent on fixing urlparse for fragment rules in generic URI RFC and don't do anything until then? I'd go with this, even though it probably would be a lot bigger work than this. What's Éric's take on this

[issue12657] Cannot override JSON encoding of basic type subclasses

2011-10-27 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12657 ___ ___

[issue13272] 2to3 fix_renames doesn't rename string.lowercase/uppercase/letters

2011-10-27 Thread Ezio Melotti
New submission from Ezio Melotti ezio.melo...@gmail.com: $ cat deleteme.py from string import lowercase, uppercase, letters print uppercase == 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' print lowercase == 'abcdefghijklmnopqrstuvwxyz' print letters == 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' $

[issue13237] subprocess docs should emphasise convenience functions

2011-10-27 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: We can only protect people from themselves so much - shell=True is invaluable when you actually want to invoke the shell, and the shell has much better tools for process invocation and pipeline processing than Python does (since shells are,

[issue13244] WebSocket schemes in urllib.parse

2011-10-27 Thread Senthil Kumaran
Senthil Kumaran sent...@uthcode.com added the comment: This kind of suggestion has come up before and easy fix is to add individual schemes as the patch does. There is a number of limitations if want to make the parser generic for any scheme. The difficult thing being the parsing behavior and

[issue13237] subprocess docs should emphasise convenience functions

2011-10-27 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 2a2df6a72ccb by Nick Coghlan in branch '2.7': Issue #13237: Make the subprocess convenience helper documentation self-contained aside from the shared parameter description. Downgrade the pipe warnings at that level

[issue13273] HTMLParser improperly handling open tags when strict is False

2011-10-27 Thread Christopher Allen-Poole
New submission from Christopher Allen-Poole christoph...@allen-poole.com: This is is encountered when extending html.parser.HTMLParser and running with strict mode False. Expected behavior: When '''div style=bThe a href=some_urlrain/a br / in spanSpain/span/b/div''' is passed to the feed

[issue13237] subprocess docs should emphasise convenience functions

2011-10-27 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: As the last checkin message says, I've made the documentation for the helper functions more self-contained. Each now has its own short shell=True warning with a pointer to the full explanation in the shared parameter description. There was

[issue13273] HTMLParser improperly handling open tags when strict is False

2011-10-27 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti stage: - test needed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13273 ___

[issue13273] HTMLParser improperly handling open tags when strict is False

2011-10-27 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: Incidentally I was just investigating this very same issue, and your suggestion seems to work for me too. I'll see if the change has any downside and come up with a patch + test. Thanks for the report! -- assignee: - ezio.melotti

[issue13244] WebSocket schemes in urllib.parse

2011-10-27 Thread Tobias Oberstein
Tobias Oberstein tobias.oberst...@tavendo.de added the comment: The patch as it stands will result in wrong behavior: +self.assertEqual(urllib.parse.urlparse(ws://example.com/stuff#ff), + ('ws', 'example.com', '/stuff#ff', '', '', '')) The path component

[issue13274] heapq pure python version uses islice without guarding for negative counts

2011-10-27 Thread Ronny Pfannschmidt
New submission from Ronny Pfannschmidt ronny.pfannschm...@gmail.com: the problem manifests when calling with negative counts when the c versions are used, a empty list is returned, however if the pure python version is called islice errors out -- components: Library (Lib) messages:

[issue10015] Creating a multiprocess.pool.ThreadPool from a child thread blows up.

2011-10-27 Thread Florent Xicluna
Changes by Florent Xicluna florent.xicl...@gmail.com: -- nosy: +flox ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10015 ___ ___ Python-bugs-list

[issue12657] Cannot override JSON encoding of basic type subclasses

2011-10-27 Thread Florent Xicluna
Changes by Florent Xicluna florent.xicl...@gmail.com: -- stage: - needs patch type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12657 ___

[issue13275] Recommend xml.etree for XML processing

2011-10-27 Thread Alexey Shamrin
New submission from Alexey Shamrin sham...@gmail.com: There are many libraries in Python stdlib [1] xml.dom xml.dom.minidom xml.dom.pulldom xml.sax xml.etree Tutorial mentions xml.dom and xml.sax. [2] In my experience xml.etree is the best library to quickly load some xml and mess with it.

[issue13275] Recommend xml.etree for XML processing

2011-10-27 Thread Florent Xicluna
Changes by Florent Xicluna florent.xicl...@gmail.com: -- components: +XML type: - behavior versions: +Python 2.7, Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13275

[issue13275] Recommend xml.etree for XML processing

2011-10-27 Thread Florent Xicluna
Changes by Florent Xicluna florent.xicl...@gmail.com: -- nosy: +flox ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13275 ___ ___ Python-bugs-list

[issue13268] assert statement violates the documentation

2011-10-27 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 7bef55ae5753 by Benjamin Peterson in branch '2.7': don't let a tuple msg be interpreted as arguments to AssertionError (closes #13268) http://hg.python.org/cpython/rev/7bef55ae5753 -- nosy: +python-dev

[issue13271] When -h is used with argparse, default values that fail should not matter

2011-10-27 Thread Petri Lehtinen
Changes by Petri Lehtinen pe...@digip.org: -- nosy: +petri.lehtinen ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13271 ___ ___ Python-bugs-list

[issue13274] heapq pure python version uses islice without guarding for negative counts

2011-10-27 Thread Petri Lehtinen
Changes by Petri Lehtinen pe...@digip.org: -- nosy: +petri.lehtinen ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13274 ___ ___ Python-bugs-list

[issue13275] Recommend xml.etree for XML processing

2011-10-27 Thread Petri Lehtinen
Changes by Petri Lehtinen pe...@digip.org: -- nosy: +petri.lehtinen ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13275 ___ ___ Python-bugs-list

[issue13274] heapq pure python version uses islice without guarding for negative counts

2011-10-27 Thread Benjamin Peterson
Changes by Benjamin Peterson benja...@python.org: -- nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13274 ___ ___

[issue13033] Add shutil.chowntree

2011-10-27 Thread Senthil Kumaran
Changes by Senthil Kumaran sent...@uthcode.com: -- nosy: +orsenthil ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13033 ___ ___ Python-bugs-list

[issue13188] generator.throw() ignores __traceback__ of exception

2011-10-27 Thread Arkadiusz Wahlig
Arkadiusz Wahlig arkadiusz.wah...@gmail.com added the comment: I don't think this should be applied to 2.7. In 2.x, the full exception info consists of the (type, value, traceback)-trio. Programmer is expected to pass this around to retain full exception info. Re-raising just the value

[issue13272] 2to3 fix_renames doesn't rename string.lowercase/uppercase/letters

2011-10-27 Thread Meador Inge
Changes by Meador Inge mead...@gmail.com: -- nosy: +meador.inge ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13272 ___ ___ Python-bugs-list

[issue13266] Add inspect.unwrap(f) to easily unravel __wrapped__ chains

2011-10-27 Thread Meador Inge
Changes by Meador Inge mead...@gmail.com: -- nosy: +meador.inge ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13266 ___ ___ Python-bugs-list

[issue13253] 2to3 fix_renames renames sys.maxint only in imports

2011-10-27 Thread Meador Inge
Changes by Meador Inge mead...@gmail.com: -- nosy: +meador.inge ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13253 ___ ___ Python-bugs-list

[issue5661] asyncore should catch EPIPE while sending() and receiving()

2011-10-27 Thread Xavier de Gaye
Xavier de Gaye xdeg...@gmail.com added the comment: Uploaded the patch 'epipe-default.patch' with a test case that breaks on linux when EPIPE is not handled by asyncore, which is the case with Python 3.2 and previous versions. -- Added file:

[issue5661] asyncore should catch EPIPE while sending() and receiving()

2011-10-27 Thread Xavier de Gaye
Xavier de Gaye xdeg...@gmail.com added the comment: Uploaded the same test case for Python 2.7. -- Added file: http://bugs.python.org/file23534/epipe-2.7.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5661

[issue5661] asyncore should catch EPIPE while sending() and receiving()

2011-10-27 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5661 ___ ___

[issue13244] WebSocket schemes in urllib.parse

2011-10-27 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Is urlparse meant to follow the generic URI RFC? No, it predates it. IMHO, the patch at least should do the equivalent of urlparse.uses_fragment.extend(wsschemes) so users of urlparse can do the checking for fragment != , required for

[issue13273] HTMLParser improperly handling open tags when strict is False

2011-10-27 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: The attached patch fixes replaces search with match as you suggested and tweaks a regex to make the old tests pass. -- keywords: +patch stage: test needed - commit review versions: +Python 2.7, Python 3.3 Added file:

[issue13244] WebSocket schemes in urllib.parse

2011-10-27 Thread Senthil Kumaran
Senthil Kumaran sent...@uthcode.com added the comment: Similar issue Issue7904 and 7da7f9bfdaac wherein the accepted way to parse x-newscheme://foo.com/stuff was added. Does the new ws:// scheme not fall under that? -- ___ Python tracker

[issue13244] WebSocket schemes in urllib.parse

2011-10-27 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13244 ___ ___ Python-bugs-list

[issue13276] distutils bdist_wininst created installer does not run the postinstallation script on uninstalling

2011-10-27 Thread francisco
New submission from francisco frandelap...@gmail.com: The bug can be reproduced by running the following command to create a Windows installer for the attached module: python setup.py bdist_wininst --install-script pis.py I include also the installer that I have created in the dist folder.

  1   2   >