python-graph 1.8.0 released

2010-10-02 Thread Pedro Matiello
python-graph release 1.8.0 http://code.google.com/p/python-graph/ python-graph is a library for working with graphs in Python. This software provides a suitable data structure for representing graphs and a whole set

Problem saving uploaded files in Python3

2010-10-02 Thread hidura
Hello, i control the problem of the data what is uploaded by the POST method, in the web if the file is a text theres no problem but the trouble comes when it's an enconded file as a Picture or other what the when the system insert the data into the file well it doesn 't encoded in the write

Re: Problem saving uploaded files in Python3

2010-10-02 Thread Chris Rebert
On Fri, Oct 1, 2010 at 11:13 PM, hid...@gmail.com wrote: Hello, i control the problem of the data what is uploaded by the POST method, in the web if the file is a text theres no problem but the trouble comes when it's an enconded file as a Picture or other what the when the system insert the

Re: Strong typing vs. strong testing

2010-10-02 Thread Steven D'Aprano
On Fri, 01 Oct 2010 11:56:24 +0200, Pascal J. Bourguignon wrote: Actually, it's hard to find a language that has no compiler generating faster code than C... Perl. Python. Ruby. Applescript. Hypertalk. Tcl. RPL. Frink. Inform 7. ActionScript. Dylan. Emerald. And hundreds more serious

Re: if the else short form

2010-10-02 Thread Steven D'Aprano
On Fri, 01 Oct 2010 22:19:14 -0700, Paul Rubin wrote: Steven D'Aprano st...@remove-this-cybersource.com.au writes: Incorrect. bools *are* ints in Python, beyond any doubt. Python 2.6.2 (r262:71600, Jun 4 2010, 18:28:58) type(3)==type(True) False So? Instances of a subclasses

Re: Crummy BS Script

2010-10-02 Thread Steven D'Aprano
On Fri, 01 Oct 2010 21:05:09 -0700, flebber wrote: On Oct 2, 9:27 am, MRAB pyt...@mrabarnett.plus.com wrote: On 01/10/2010 23:29, Burton Samograd wrote: flebberflebber.c...@gmail.com  writes: But where is this saving the imported file and under what name? Looks like samples.csv: f =

Re: if the else short form

2010-10-02 Thread Arnaud Delobelle
Paul Rubin no.em...@nospam.invalid writes: Steven D'Aprano st...@remove-this-cybersource.com.au writes: Incorrect. bools *are* ints in Python, beyond any doubt. Python 2.6.2 (r262:71600, Jun 4 2010, 18:28:58) type(3)==type(True) False Of course, but it's the wrong thing to

Re: if the else short form

2010-10-02 Thread Ian
On Oct 1, 11:19 pm, Paul Rubin no.em...@nospam.invalid wrote: Steven D'Aprano st...@remove-this-cybersource.com.au writes: Incorrect. bools *are* ints in Python, beyond any doubt.     Python 2.6.2 (r262:71600, Jun  4 2010, 18:28:58)     type(3)==type(True)     False -1 False True 2

Re: ElementTree handling nested tag

2010-10-02 Thread Diez B. Roggisch
tekion tek...@gmail.com writes: All, I have the following xml tag: event resource_access actionhttpRequest/action httpurlHTTP://cmd.wma.ibm.com:80//httpurl httpmethodGET/httpmethod httpresponse200/httpresponse /resource_access /event I am interested in:

Re: Problem saving uploaded files in Python3

2010-10-02 Thread Diez B. Roggisch
Chris Rebert c...@rebertia.com writes: On Fri, Oct 1, 2010 at 11:13 PM, hid...@gmail.com wrote: Hello, i control the problem of the data what is uploaded by the POST method, in the web if the file is a text theres no problem but the trouble comes when it's an enconded file as a Picture or

Re: Strong typing vs. strong testing

2010-10-02 Thread Nick Keighley
On 1 Oct, 11:02, p...@informatimago.com (Pascal J. Bourguignon) wrote: Seebs usenet-nos...@seebs.net writes: On 2010-09-30, Ian Collins ian-n...@hotmail.com wrote: Which is why agile practices such as TDD have an edge.  If it compiles *and* passes all its tests, it must be right. So

Re: Strong typing vs. strong testing

2010-10-02 Thread Nick Keighley
On 1 Oct, 19:33, RG rnospa...@flownet.com wrote: In article slrniabt2j.1561.usenet-nos...@guild.seebs.net,  Seebs usenet-nos...@seebs.net wrote: On 2010-10-01, RG rnospa...@flownet.com wrote: snip Those goal posts are sorta red shifted at this point. [...] Red shifted? Moving away

http://www.dating4url.blogspot.com

2010-10-02 Thread roshini begum
http://www.dating4url.blogspot.com -- http://mail.python.org/mailman/listinfo/python-list

read() returns data of different sizes

2010-10-02 Thread jimgardener
hi while trying out urllib.urlopen ,I wrote this code to read a url and return the data length import datetime,time,urllib def get_page_size(pageurlstr): h=urllib.urlopen(pageurlstr) data=h.read() return len(data) while True: print 'reading url www.google.com

Unclear datetime.date type when using isinstance

2010-10-02 Thread Mailing List
Was including a input check on a function argument which is expecting a datetime.date. When running unittest no exception was raised when a datetime.datetime instance was used as argument. Some playing with the console lead to this: import datetime dt1 = datetime.datetime(2010, 10, 2)

Re: read() returns data of different sizes

2010-10-02 Thread Chris Rebert
On Sat, Oct 2, 2010 at 4:58 AM, jimgardener jimgarde...@gmail.com wrote: hi while trying out urllib.urlopen ,I wrote this code to read a url and return the data length import datetime,time,urllib def get_page_size(pageurlstr):    h=urllib.urlopen(pageurlstr)    data=h.read()    return

Re: Unclear datetime.date type when using isinstance

2010-10-02 Thread Chris Rebert
On Sat, Oct 2, 2010 at 5:12 AM, Mailing List li...@fastmail.net wrote: Was including a input check on a function argument which is expecting a datetime.date. When running unittest no exception was raised when a datetime.datetime instance was used as argument. Some playing with the console lead

Re: Regular Expression Skipping Match

2010-10-02 Thread Thomas Jollans
On Saturday 02 October 2010, it occurred to AON LAZIO to exclaim: Hi python pals, I need this help, say I have h = Hello \n World How would I create a regular expression that match only Hello World? (ignore \n in the middle) What exactly are you looking for? One way to solve your

Re: Unclear datetime.date type when using isinstance

2010-10-02 Thread Diez B. Roggisch
Mailing List li...@fastmail.net writes: Was including a input check on a function argument which is expecting a datetime.date. When running unittest no exception was raised when a datetime.datetime instance was used as argument. Some playing with the console lead to this: import datetime

How to find free resident memory in Linux using python

2010-10-02 Thread Sandy
Hi all, I want to find how much free memory (RAM) is available in my system using python. I tried psutil, parsing /proc/meminfo, top output etc but not satisfied. For example my gnome-system-monitor gui shows I am using 1GB (25%) of my RAM while /proc/meminfo, top, psutil says around 2GB is used.

Re: How to find free resident memory in Linux using python

2010-10-02 Thread Antoine Pitrou
On Sat, 2 Oct 2010 07:06:37 -0700 (PDT) Sandy dksre...@gmail.com wrote: Hi all, I want to find how much free memory (RAM) is available in my system using python. Take a look at http://www.selenic.com/smem/ It's written in Python. Regards Antoine. --

Re: Re: Problem saving uploaded files in Python3

2010-10-02 Thread hidura
The results was that, i can upload all the data normally comes as an byte code and looks like this:

Re: sequence multiplied by -1

2010-10-02 Thread Carl Banks
On Oct 1, 9:38 pm, Steven D'Aprano st...@remove-this- cybersource.com.au wrote: If so, then we haven't gained anything, and the only thing that would satisfy such people would be for every function name and operator to be unique -- something which is impossible in practice, even if it were

Re: Regular Expression Skipping Match

2010-10-02 Thread MRAB
On 02/10/2010 04:13, AON LAZIO wrote: Hi python pals, I need this help, say I have h = Hello \n World How would I create a regular expression that match only Hello World? (ignore \n in the middle) Thanks in advance \s matches any whitespace, so: Hello\s+World --

Random math op

2010-10-02 Thread Hugo Léveillé
Hi let say I have a simple math apps that randomize number X and number Y. How would you randomize between '/','*','+', and '-' for that math operation -- Hugo Léveillé hu...@fastmail.net -- http://mail.python.org/mailman/listinfo/python-list

Deditor:Pythonic text editor

2010-10-02 Thread Kruptein
Hey, I released the 0.2.1 version of my text-editor written for linux in python using the wxPython toolkit. I would like to know whether it is good/bad and what could be changed/ added this version added -syntax-highlighting for 78 languages -Tab completion in the filepath bar -Shortcut

Re: Random math op

2010-10-02 Thread Benjamin Kaplan
use the add, sub, div, and mul functions in the operator module. Stick them in a list, and then randomly pull one out. On Sat, Oct 2, 2010 at 12:53 PM, Hugo Léveillé hu...@fastmail.net wrote: Hi let say I have a simple math apps that randomize number X and number Y. How would you randomize

Re: How to find free resident memory in Linux using python

2010-10-02 Thread Albert Hopkins
On Sat, 2010-10-02 at 07:06 -0700, Sandy wrote: Hi all, I want to find how much free memory (RAM) is available in my system using python. I tried psutil, parsing /proc/meminfo, top output etc but not satisfied. For example my gnome-system-monitor gui shows I am using 1GB (25%) of my RAM while

Re: Deditor:Pythonic text editor

2010-10-02 Thread aug dawg
I think there is a bad import in /deditor/deditor.py. It says import wx.aui and this makes the program fail. At least for me, anyway. Something might be messed up with my computer. On Sat, Oct 2, 2010 at 12:56 PM, Kruptein darragh@gmail.com wrote: Hey, I released the 0.2.1 version of my

Re: Random math op

2010-10-02 Thread geremy condra
On Sat, Oct 2, 2010 at 9:53 AM, Hugo Léveillé hu...@fastmail.net wrote: Hi let say I have a simple math apps that randomize number X and number Y. How would you randomize between '/','*','+', and '-' for that math operation What does it mean to 'randomize' a number? Just pick a number at

Re: C API: Getting PyObject by name

2010-10-02 Thread pbienst
For reference to posterity, this is how I got it to work in the end: PyObject* module = PyImport_ImportModule(__builtin__); PyObject* obj = PyRun_String(1, Py_eval_input, PyModule_GetDict(module), NULL); Py_DECREF(module); long d = PyLong_AsLong(obj); printf(long:%ld\n, d);

Fastest technique for string concatenation

2010-10-02 Thread python
My understanding is that appending to a list and then joining this list when done is the fastest technique for string concatenation. Is this true? The 3 string concatenation techniques I can think of are: - append to list, join - string 'addition' (s = s + char) - cStringIO The code that

Re: Fastest technique for string concatenation

2010-10-02 Thread Emile van Sebille
On 10/2/2010 12:09 PM pyt...@bdurham.com said... Your times will improve when not burdened by the repeated method lookups and element-wise list creation: try with eg, def testListAppend2(): output = list() append = output.append for char in source: append( char )

SQLite is quite SQL compliant

2010-10-02 Thread Ravi
The documentation of the sqlite module at http://docs.python.org/library/sqlite3.html says: ...allows accessing the database using a nonstandard variant of the SQL... But if you see SQLite website they clearly say at http://sqlite.org/omitted.html that only very few of the SQL is not

Re: Fastest technique for string concatenation

2010-10-02 Thread Carey Tilden
On Sat, Oct 2, 2010 at 12:09 PM, pyt...@bdurham.com wrote: My understanding is that appending to a list and then joining this list when done is the fastest technique for string concatenation. Is this true? Have you profiled an application and found string concatenation to be a performance

Re: Fastest technique for string concatenation

2010-10-02 Thread python
Emile, Your times will improve when not burdened by the repeated method lookups and element-wise list creation. Excellent point!! Here's updated timings for each technique followed by copy and paste source code for anyone that wants to fiddle with these tests. I've placed your name above

Re: sequence multiplied by -1

2010-10-02 Thread MRAB
On 02/10/2010 20:50, Dennis Lee Bieber wrote: On 02 Oct 2010 04:38:16 GMT, Steven D'Aprano st...@remove-this-cybersource.com.au declaimed the following in gmane.comp.python.general: If so, then we haven't gained anything, and the only thing that would satisfy such people would be for every

Re: sequence multiplied by -1

2010-10-02 Thread geremy condra
On Sat, Oct 2, 2010 at 1:24 PM, MRAB pyt...@mrabarnett.plus.com wrote: On 02/10/2010 20:50, Dennis Lee Bieber wrote: On 02 Oct 2010 04:38:16 GMT, Steven D'Aprano st...@remove-this-cybersource.com.au  declaimed the following in gmane.comp.python.general: If so, then we haven't gained

Re: How to find free resident memory in Linux using python

2010-10-02 Thread Seebs
On 2010-10-02, Sandy dksre...@gmail.com wrote: I want to find how much free memory (RAM) is available in my system using python. The question is essentially incoherent on modern systems. You'd have to define terms. Consider that on a given system, it's quite possible that gigabytes of space

Re: SQLite is quite SQL compliant

2010-10-02 Thread Cousin Stanley
Ravi wrote: The documentation of the sqlite module at http://docs.python.org/library/sqlite3.html says: ... allows accessing the database using a nonstandard variant of the SQL... But if you see SQLite website they clearly say at http://sqlite.org/omitted.html that only very

Re: Fastest technique for string concatenation

2010-10-02 Thread python
Carey, Have you profiled an application and found string concatenation to be a performance bottleneck? I would be surprised, but it's always possible.  The application is very simple - its essentially a finite state machine that parses complex RTF files. We read char by char and do lots of

[C-API] Weird sys.exc_info reference segfault

2010-10-02 Thread Jonas H.
Hello list, I have a really weird reference problem with `sys.exc_info`, and, if I'm right, function frames. The software in question is bjoern, a WSGI web server written in C, which you can find at http://github.com/jonashaag/bjoern. This WSGI application: def app(env, start_response):

Re: SQLite is quite SQL compliant

2010-10-02 Thread Seebs
On 2010-10-02, Ravi ra.ravi@gmail.com wrote: The documentation of the sqlite module at http://docs.python.org/library/sqlite3.html says: ...allows accessing the database using a nonstandard variant of the SQL... But if you see SQLite website they clearly say at

Re: sequence multiplied by -1

2010-10-02 Thread MRAB
On 02/10/2010 22:12, Dennis Lee Bieber wrote: On Sat, 02 Oct 2010 21:24:19 +0100, MRABpyt...@mrabarnett.plus.com declaimed the following in gmane.comp.python.general: How about ~, which is currently has only a unary form: foo ~ bar 'foobar' [1, 2, 3] ~ [4, 5, 6] [1, 2, 3, 4, 5, 6]

Re: Crummy BS Script

2010-10-02 Thread flebber
On Oct 2, 4:24 pm, Steven D'Aprano st...@remove-this- cybersource.com.au wrote: On Fri, 01 Oct 2010 21:05:09 -0700, flebber wrote: On Oct 2, 9:27 am, MRAB pyt...@mrabarnett.plus.com wrote: On 01/10/2010 23:29, Burton Samograd wrote: flebberflebber.c...@gmail.com  writes: But where is

Re: SQLite is quite SQL compliant

2010-10-02 Thread Tim Chase
On 10/02/10 17:06, Seebs wrote: On 2010-10-02, Ravira.ravi@gmail.com wrote: The documentation of the sqlite module at http://docs.python.org/library/sqlite3.html says: ...allows accessing the database using a nonstandard variant of the SQL... I would agree that the word nonstandard

Re: Crummy BS Script

2010-10-02 Thread John Bokma
flebber flebber.c...@gmail.com writes: On Oct 2, 4:24 pm, Steven D'Aprano st...@remove-this- cybersource.com.au wrote: On Fri, 01 Oct 2010 21:05:09 -0700, flebber wrote: On Oct 2, 9:27 am, MRAB pyt...@mrabarnett.plus.com wrote: On 01/10/2010 23:29, Burton Samograd wrote:

Re: SQLite is quite SQL compliant

2010-10-02 Thread D'Arcy J.M. Cain
On 02 Oct 2010 22:06:58 GMT Seebs usenet-nos...@seebs.net wrote: I would agree that the word nonstandard seems to be a little strong and discouraging. sqlite is a source of joy, a small bright point of decent and functional software in a world full of misbehaving crap. While it does omit a

Re: SQLite is quite SQL compliant

2010-10-02 Thread Philip Semanchuk
On Oct 2, 2010, at 6:58 PM, Tim Chase wrote: On 10/02/10 17:06, Seebs wrote: On 2010-10-02, Ravira.ravi@gmail.com wrote: The documentation of the sqlite module at http://docs.python.org/library/sqlite3.html says: ...allows accessing the database using a nonstandard variant of the

Re: [C-API] Weird sys.exc_info reference segfault

2010-10-02 Thread Antoine Pitrou
On Sat, 02 Oct 2010 23:35:01 +0200 Jonas H. jo...@lophus.org wrote: This WSGI application: def app(env, start_response): start_response('200 alright', []) try: a except: import sys sys.exc_info() return ['hello']

Re: SQLite is quite SQL compliant

2010-10-02 Thread Antoine Pitrou
On Sat, 2 Oct 2010 19:13:11 -0400 Philip Semanchuk phi...@semanchuk.com wrote: On Oct 2, 2010, at 6:58 PM, Tim Chase wrote: On 10/02/10 17:06, Seebs wrote: On 2010-10-02, Ravira.ravi@gmail.com wrote: The documentation of the sqlite module at

WSGI by HTTP GET

2010-10-02 Thread Niklasro
Hello Getting a web same page with 2 or more possible states eg business part, private part or all parts, can you recommend a way to represent the states via HTTP GET? Feasible way could be ?business=business, ? type=business, ?business=true or others. Should I minimize casting the variable? Which

Re: sequence multiplied by -1

2010-10-02 Thread Steven D'Aprano
On Sat, 02 Oct 2010 14:12:39 -0700, Dennis Lee Bieber wrote: I'd prefer to see it used for floating point comparison in the two character: x ~= y though one might need to set up some system parameter to define what the permissible delta would be...

Re: sequence multiplied by -1

2010-10-02 Thread Steven D'Aprano
On Sat, 02 Oct 2010 14:09:15 -0700, geremy condra wrote: I'd actually love the ability to overload this, although I'm not sold on the itertools.chain thing. To me it looks a lot like the 'is isomorphic' operator from graph theory, and we could really use that in Graphine. You can overload the

Re: WSGI by HTTP GET

2010-10-02 Thread Hidura
Be more specific but i recommend you, use a way in what you be very explicit eg:part='bussiness' a bool for 3 options it's very diffcult to handle. 2010/10/2, Niklasro nikla...@gmail.com: Hello Getting a web same page with 2 or more possible states eg business part, private part or all parts,

Re: Fastest technique for string concatenation

2010-10-02 Thread Steven D'Aprano
On Sat, 02 Oct 2010 13:17:02 -0700, Carey Tilden wrote: Have you profiled an application and found string concatenation to be a performance bottleneck?  I would be surprised, but it's always possible.  If not, I'd suggest you choose the technique that is most clear and concise, and worry

Re: WSGI by HTTP GET

2010-10-02 Thread MRAB
On 03/10/2010 03:29, Hidura wrote: 2010/10/2, Niklasronikla...@gmail.com: Hello Getting a web same page with 2 or more possible states eg business part, private part or all parts, can you recommend a way to represent the states via HTTP GET? Feasible way could be ?business=business, ?

Re: sequence multiplied by -1

2010-10-02 Thread Steven D'Aprano
On Sat, 02 Oct 2010 12:50:02 -0700, Dennis Lee Bieber wrote: Well... We could maybe borrow from REXX... and use || for concatenation. || for concatenation? What's the connection between the pipe character and concatenation? I realise that, ultimately, every symbol was

Re: sequence multiplied by -1

2010-10-02 Thread Seebs
On 2010-10-03, Steven D'Aprano st...@remove-this-cybersource.com.au wrote: On Sat, 02 Oct 2010 12:50:02 -0700, Dennis Lee Bieber wrote: Well... We could maybe borrow from REXX... and use || for concatenation. || for concatenation? What's the connection between the pipe

Re: Crummy BS Script

2010-10-02 Thread flebber
On Oct 3, 9:58 am, John Bokma j...@castleamber.com wrote: flebber flebber.c...@gmail.com writes: On Oct 2, 4:24 pm, Steven D'Aprano st...@remove-this- cybersource.com.au wrote: On Fri, 01 Oct 2010 21:05:09 -0700, flebber wrote: On Oct 2, 9:27 am, MRAB pyt...@mrabarnett.plus.com wrote:

Re: Crummy BS Script

2010-10-02 Thread flebber
On Oct 3, 4:15 pm, flebber flebber.c...@gmail.com wrote: On Oct 3, 9:58 am, John Bokma j...@castleamber.com wrote: flebber flebber.c...@gmail.com writes: On Oct 2, 4:24 pm, Steven D'Aprano st...@remove-this- cybersource.com.au wrote: On Fri, 01 Oct 2010 21:05:09 -0700, flebber

[issue9951] introduce bytes.hex method

2010-10-02 Thread Nick Coghlan
Changes by Nick Coghlan ncogh...@gmail.com: -- nosy: +ncoghlan ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9951 ___ ___ Python-bugs-list mailing

[issue9951] introduce bytes.hex method

2010-10-02 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: Patch generally looks good, but the type of retbuf is incorrect (should be Py_UNICODE* rather than wchar_t*). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9951

[issue6612] 'import site' fails when called from an unlinked directory

2010-10-02 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: A unit test is needed. Not to check the code, but to ensure that we don't break it in the future. -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org

[issue1767933] Badly formed XML using etree and utf-16

2010-10-02 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Python 3.1 improves the situation, the file looks more like utf-16, except that the BOM (\xff\xfe) is repeated all the time, probably on every internal call to file.write(). Here is a test script that should work on both 2.7 and 3.1.

[issue10013] fix `./libpython2.6.so: undefined re ference to `_PyParser_Grammar´` in parallel builds

2010-10-02 Thread Paul Menzel
New submission from Paul Menzel paulepan...@users.sourceforge.net: Compiling Python in parallel sometimes fails as reported in [1] and [2]. ./libpython2.6.so: undefined reference to `_PyParser_Grammar´ Fedora applies a patch by dmalcolm dmalc...@fedoraproject.org which fixes this issue

[issue8670] c_types.c_wchar should not assume that sizeof(wchar_t) == sizeof(Py_UNICODE)

2010-10-02 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: r85172 changes PyUnicode_AsWideCharString() (don't count the trailing nul character in the output size) and add unit tests. r85173 patches unicode_aswidechar() to supports non-BMP characters for all known wchar_t/Py_UNICODE size

[issue10013] fix `./libpython2.6.so: undefined re ference to `_PyParser_Grammar´` in parallel builds

2010-10-02 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: 2.6 is closed for bug fixes, so this cannot be applied anymore. Notice that py3k has this fixed in r84068; I'll backport the fix to 2.7. -- nosy: +loewis ___ Python tracker rep...@bugs.python.org

[issue8670] c_types.c_wchar should not assume that sizeof(wchar_t) == sizeof(Py_UNICODE)

2010-10-02 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: r85174+r85177: ctypes.c_wchar supports non-BMP characters with 32 bits wchar_t = fix this issue (I commited also an unwanted change on _testcapi to fix r85172 in r85174: r85175 reverts this change, and r85176 fixes the _testcapi

[issue8670] c_types.c_wchar should not assume that sizeof(wchar_t) == sizeof(Py_UNICODE)

2010-10-02 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: r85173 patches unicode_aswidechar() to supports non-BMP characters for all known wchar_t/Py_UNICODE size combinaisons (2/2, 2/4 and 4/2). Oh, and 4/4 ;-) -- ___ Python tracker

[issue10013] fix `./libpython2.6.so: undefined re ference to `_PyParser_Grammar´` in parallel builds

2010-10-02 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- nosy: +dmalcolm ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10013 ___ ___ Python-bugs-list

[issue10014] sys.path[0] is incorrect if PYTHONFSENCODING is used

2010-10-02 Thread STINNER Victor
New submission from STINNER Victor victor.stin...@haypocalc.com: In the following example, sys.path[0] should be '/home/SHARE/SVN/py3k\udcc3\udca9' (my locale and filesystem encodings are utf-8): $ cd /home/SHARE/SVN/py3ké $ echo import sys; print(sys.path[0]) x.py $ ./python x.py

[issue9992] Command line arguments are not correctly decodedif locale and fileystem encodings aredifferent

2010-10-02 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: See also #10014: sys.path[0] is decoded from the locale encoding instead of the fileystem encoding. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9992

[issue9533] metaclass can't derive from ABC

2010-10-02 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +benjamin.peterson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9533 ___ ___ Python-bugs-list

[issue8670] c_types.c_wchar should not assume that sizeof(wchar_t) == sizeof(Py_UNICODE)

2010-10-02 Thread Daniel Stutzbach
Daniel Stutzbach dan...@stutzbachenterprises.com added the comment: Thanks for working on this! Since this was a bugfix, it should be merged back into 2.7, yes? -- stage: unit test needed - committed/rejected ___ Python tracker

[issue6706] asyncore's accept() is broken

2010-10-02 Thread Giampaolo Rodola'
Giampaolo Rodola' g.rod...@gmail.com added the comment: Patch in attachment adds a handled_accepted() method to dispatcher class as recommended by Antoine. -- Added file: http://bugs.python.org/file19104/accept.patch ___ Python tracker

[issue10011] `except` doesn't use `isinstance`

2010-10-02 Thread Ram Rachum
Ram Rachum cool...@cool-rr.com added the comment: Also, how important is the performance of exception checking *after* an exception was raised? I mean, wouldn't it matter only for programs that raise and catch hundreds of exceptions a second? --

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

2010-10-02 Thread Michael Olson
New submission from Michael Olson ol...@irinim.net: Using Python 2.7 x32 on Windows XP Attempting to create a multiprocessing.pool.ThreadPool in a child thread created using threading.Thread, an AttributeError is thrown. A ThreadPool created in the main thread can be passed to the child thread

[issue9807] deriving configuration information for different builds with the same prefix

2010-10-02 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9807 ___

[issue5117] os.path.relpath problem with root directory

2010-10-02 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: In py3k, ntpath is almost fixed. but posixpath is not fixed yet. ntpath has another problem about case sensitivity. I'll attach the patch to fix ntpath's case issue and posixpath. In Py27, ntpath has whole issue still there.

[issue5117] os.path.relpath problem with root directory

2010-10-02 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: I'll create the patch for it. -- versions: -Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5117 ___

[issue10016] shutil.copyfile -- allow sparse copying

2010-10-02 Thread Tom Potts
New submission from Tom Potts karake...@gmail.com: Copying a sparse file under Linux using shutil.copyfile will not result in a sparse file at the end of the process. I'm submitting a patch that will remedy this. Note that I am only concerned with Linux at the moment -- as far as I know this

[issue10016] shutil.copyfile -- allow sparse copying

2010-10-02 Thread Tom Potts
Tom Potts karake...@gmail.com added the comment: (see opening message) -- Added file: http://bugs.python.org/file19108/shutil-2.7.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10016

[issue10016] shutil.copyfile -- allow sparse copying

2010-10-02 Thread Tom Potts
Changes by Tom Potts karake...@gmail.com: Added file: http://bugs.python.org/file19109/shutil-3.2.1.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10016 ___

[issue9533] metaclass can't derive from ABC

2010-10-02 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Does the fix for issue 10006 affect this? (I imagine that question is why Antoine made Benjamin nosy on this issue). -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org

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

2010-10-02 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- nosy: +asksol, jnoller type: crash - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10015 ___

[issue10016] shutil.copyfile -- allow sparse copying

2010-10-02 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: You are right that this needs to be tested on other platforms. In order to so test it (and in any case!), the patch will need unit tests. It also needs doc updates. In general patch itself looks good to me, modulo the concern you

[issue8670] c_types.c_wchar should not assume that sizeof(wchar_t) == sizeof(Py_UNICODE)

2010-10-02 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Since this was a bugfix, it should be merged back into 2.7, yes? Mmmh, the fix requires to change PyUnicode_AsWideChar() function (support non-BMP characters and surrogate pairs) (and maybe also to create

[issue8670] c_types.c_wchar should not assume that sizeof(wchar_t) == sizeof(Py_UNICODE)

2010-10-02 Thread Daniel Stutzbach
Daniel Stutzbach dan...@stutzbachenterprises.com added the comment: Since I noticed the bug through source code inspection and no one has reported it occurring in practice, that sounds reasonable to me. -- versions: -Python 2.7 ___ Python tracker

[issue1050268] rfc822.parseaddr is broken, breaks sendmail call in smtplib

2010-10-02 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Fix committed to py3k in r85179, 3.1 in r85170, and 2.7 in r85181. I modified the unit tests, deleting the ones that were redundant because they were just two different python spellings of the same input string, and adding a comment

[issue7511] msvc9compiler.py: ValueError: [u'path']

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

[issue10006] non-Pythonic fate of __abstractmethods__

2010-10-02 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: 2010/10/1 Yaroslav Halchenko rep...@bugs.python.org: Yaroslav Halchenko yarikop...@gmail.com added the comment: yikes... surprising resolution -- I expected that fix would either makes __abstractmethods__ accessible in derived types

[issue8792] Support Apache extensions to XML-RPC in xmlrpclib

2010-10-02 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: It's easy enough to subclass the Transport type and add custom types to the dispatcher object, see the script below. Attila, Bhargav, is this solution acceptable to you? from xmlrpclib import Transport, ServerProxy class

[issue9369] const char* for PyObject_CallMethod and PyObject_CallFunction

2010-10-02 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Martin, what do you think about this kind of changes? Are there possible regressions or incompatibilities? -- nosy: +amaury.forgeotdarc, loewis ___ Python tracker rep...@bugs.python.org

[issue9369] const char* for PyObject_CallMethod and PyObject_CallFunction

2010-10-02 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: AFAICT, they are compatible, so +1. The typical proposition of an incompatible change either proposes to use const char* as the return type, or has multi-level pointers that are proposed to be constified. --

[issue9369] const char* for PyObject_CallMethod and PyObject_CallFunction

2010-10-02 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Thanks for the confirmation! -- resolution: - accepted ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9369 ___

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

2010-10-02 Thread Jesse Noller
Jesse Noller jnol...@gmail.com added the comment: I can not, for the life of me, remember why ThreadPool is there, except as a fallback. It's also not part of the documented interface as well. Additionally, in Python 3 we now have futures. -- ___

[issue9533] metaclass can't derive from ABC

2010-10-02 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: You can now create metaclass abcs. However, having __abstractmethods__ does not prevent instance creation. This is a problem with a builtins, though. -- resolution: - fixed status: open - closed

[issue10011] `except` doesn't use `isinstance`

2010-10-02 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: It matters when exceptions are expected or are a normal part of control flow. For example StopIteration. -- nosy: +benjamin.peterson ___ Python tracker rep...@bugs.python.org

[issue4661] email.parser: impossible to read messages encoded in a different encoding

2010-10-02 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Version 4 of patch, now including doc updates. The patch set is now complete. -- Added file: http://bugs.python.org/file19110/email_parse_bytes4.diff ___ Python tracker rep...@bugs.python.org

  1   2   >