[ANN] Python Summer Course in Germany, August 2010

2010-07-28 Thread Mike Müller
We offer a 6-day Python Summer Course in Leipzig, Germany from August 16 to August 21, 2010: http://www.python-academy.com/courses/python_summer_course.html The course consists of three days of Python for Programmers: http://www.python-academy.com/courses/python_course_programmers.html August 16

[ANN] Lupa 0.10 - Lua in Python

2010-07-28 Thread Stefan Behnel
Hi all, I'm happy to announce the release of Lupa 0.10. http://pypi.python.org/pypi/lupa/0.10 What is Lupa? -- Lupa integrates the LuaJIT2 runtime [1] into CPython. It is a rewrite of LunaticPython in Cython. Features - * separate Lua runtime states through a

Re: Why is there no platform independent way of clearing a terminal?

2010-07-28 Thread Ulrich Eckhardt
Daniel Fetchinson wrote: After getting the technicalities out of the way, maybe I should have asked: Is it only me or others would find a platform independent python API to clear the terminal useful? There are two kinds of programs: 1. Those that process input to output. If one of those

Re: Where is the help page for re.MatchObject?

2010-07-28 Thread John Machin
On Jul 28, 1:26 pm, Peng Yu pengyu...@gmail.com wrote: I know the library reference webpage for re.MatchObject is athttp://docs.python.org/library/re.html#re.MatchObject But I don't find such a help page in python help(). Does anybody know how to get it in help()? Yes, but it doesn't tell

Re: python styles: why Use spaces around arithmetic operators?

2010-07-28 Thread J.B. Brown
I personally prefer to be slightly excessive in the amount of spacing I used, especially when parentheses are involved. In no way do I assert that my code style is right for all situations, but here are a few examples of my personal style. --- myTuple = ( 1, 2, 3, 4, 5 )# Comment about what

Re: hasattr + __getattr__: I think this is Python bug

2010-07-28 Thread Bruno Desthuilliers
Ethan Furman a écrit : Bruno Desthuilliers wrote: Bruno Desthuilliers a écrit : Ethan Furman a écrit : Bruno Desthuilliers wrote: Duncan Booth a écrit : (snip) Or you could create the default as a class attribute from the OP: I have a class (FuncDesigner oofun) that has no attribute

Which multiprocessing methods use shared memory?

2010-07-28 Thread Kevin Ar18
The multiprocessing module has 4 methods for sharing data between processes: Queues Pipes Shared Memory Map Server Process Which of these use shared memory? I understand that the 3rd (Shared Memory Map) does, but what about Queues? Thanks, Kevin

Re: Why is there no platform independent way of clearing a terminal?

2010-07-28 Thread Jonathan Hartley
On Jul 28, 8:08 am, Ulrich Eckhardt eckha...@satorlaser.com wrote: Daniel Fetchinson wrote: After getting the technicalities out of the way, maybe I should have asked: Is it only me or others would find a platform independent python API to clear the terminal useful? There are two kinds

Python parsing XML file problem with SAX

2010-07-28 Thread jia li
I have an XML file with hundreds of error elements. What's strange is only one of there elements could not be parsed correctly: error checkerREVERSE_INULL/checker functionDispose_ParameterList/function unmangled_functionDispose_ParameterList/unmangled_function statusUNINSPECTED/status num146/num

Re: Python parsing XML file problem with SAX

2010-07-28 Thread Stefan Behnel
jia li, 28.07.2010 12:10: I have an XML file with hundreds oferror elements. What's strange is only one of there elements could not be parsed correctly: error checkerREVERSE_INULL/checker functionDispose_ParameterList/function unmangled_functionDispose_ParameterList/unmangled_function

Re: Why is there no platform independent way of clearing a terminal?

2010-07-28 Thread Daniel Fetchinson
After getting the technicalities out of the way, maybe I should have asked: Is it only me or others would find a platform independent python API to clear the terminal useful? There are two kinds of programs: 1. Those that process input to output. If one of those suddenly started by

Re: Why is there no platform independent way of clearing a terminal?

2010-07-28 Thread Daniel Fetchinson
After getting the technicalities out of the way, maybe I should have asked: Is it only me or others would find a platform independent python API to clear the terminal useful? I don't know much, but just in case the following is useful to anyone: There is a Windows program called

Shox Allegria Glow, Shox FSM, Shox Dendara, Shox 45, Shox Propulsion, Shox XT,Shox Vivacity. (http://www.cntrade09.com)

2010-07-28 Thread cntrade08
For more information,please contact karen, MSN:cntrade...@hotmail.com Minimum order is one,factory price also! Paypal payment free shipping,ship time will take 4-7 working days. Shox TW,Shox Saya+,Shox Arraw+,Shox Pursuit+,Shox Turbo V+5,Shox NZ,Shox Turbo+IV 4,Shox Spotlight,Shox Saikano+,Shox

Re: newb

2010-07-28 Thread whitey
On Tue, 27 Jul 2010 19:19:59 -0700, Mithrandir wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 07/27/2010 04:07 AM, whitey wrote: hi all. am totally new to python and was wondering if there are any newsgroups that are there specifically for beginners. i have bought a book for $2

Nice way to cast a homogeneous tuple

2010-07-28 Thread wheres pythonmonks
A new python convert is now looking for a replacement for another perl idiom. In particular, since Perl is weakly typed, I used to be able to use unpack to unpack sequences from a string, that I could then use immediately as integers. In python, I find that when I use struct.unpack I tend to get

Re: Nice way to cast a homogeneous tuple

2010-07-28 Thread Nick Raptis
On 07/28/2010 04:15 PM, wheres pythonmonks wrote: f( *map(lambda x: int(x), struct.unpack('2s2s2s','123456'))) 102 But this seems too complicated. Well, you don't need the lambda at all int ===lambda x: int(x) So just write It's like writing: def myint(x): return int(x)

Re: Nice way to cast a homogeneous tuple

2010-07-28 Thread Nick Raptis
Ep, that missing line should be: On 07/28/2010 04:27 PM, Nick Raptis wrote: On 07/28/2010 04:15 PM, wheres pythonmonks wrote: f( *map(lambda x: int(x), struct.unpack('2s2s2s','123456'))) 102 But this seems too complicated. Well, you don't need the lambda at all int ===lambda x:

Re: Nice way to cast a homogeneous tuple

2010-07-28 Thread Duncan Booth
wheres pythonmonks wherespythonmo...@gmail.com wrote: 2. There is something like map(lambda x: int(x) without all the lambda function call overhead. (e.g., cast tuple)? Yes there is: lambda x: int(x) is just a roundabout way of writing int -- Duncan Booth http://kupuguy.blogspot.com

Re: Nice way to cast a homogeneous tuple

2010-07-28 Thread wheres pythonmonks
Thanks ... I thought int was a type-cast (like in C++) so I assumed I couldn't reference it. On Wed, Jul 28, 2010 at 9:31 AM, Nick Raptis airsc...@otenet.gr wrote: Ep, that missing line should be: On 07/28/2010 04:27 PM, Nick Raptis wrote: On 07/28/2010 04:15 PM, wheres pythonmonks wrote:

Re: Nice way to cast a homogeneous tuple

2010-07-28 Thread Hexamorph
wheres pythonmonks wrote: A new python convert is now looking for a replacement for another perl idiom. In particular, since Perl is weakly typed, I used to be able to use unpack to unpack sequences from a string, that I could then use immediately as integers. In python, I find that when I use

Re: Nice way to cast a homogeneous tuple

2010-07-28 Thread Ulrich Eckhardt
wheres pythonmonks wrote: Thanks ... I thought int was a type-cast (like in C++) so I assumed I couldn't reference it. Hopefully somebody correct me if I explain this badly, but I'll take a shot... Firstly, int is a class. Python doesn't make a distinction between builtin types and class

Re: Nice way to cast a homogeneous tuple

2010-07-28 Thread Tim Chase
On 07/28/10 08:15, wheres pythonmonks wrote: f( *map(lambda x: int(x), struct.unpack('2s2s2s','123456'))) 102 1. There is a way using unpack to get out string-formatted ints? well, you can use s = '123456' [int(s[i:i+2]) for i in range(0, len(s), 2)] [12, 34, 56] f(*_) 102 While your

Re: Nice way to cast a homogeneous tuple

2010-07-28 Thread Bruno Desthuilliers
wheres pythonmonks a écrit : Thanks ... I thought int was a type-cast (like in C++) so I assumed I couldn't reference it. Python has no C/C++ like type-cast. int is the builtin integer type, and instanciating an object in Python is done by calling it's type. Remember that in Python,

Re: Nice way to cast a homogeneous tuple

2010-07-28 Thread Steven D'Aprano
On Wed, 28 Jul 2010 09:35:52 -0400, wheres pythonmonks wrote: Thanks ... I thought int was a type-cast (like in C++) so I assumed I couldn't reference it. Python doesn't have type-casts in the sense of tell the compiler to treat object of type A as type B instead. The closest Python has to

Re: urllib timeout

2010-07-28 Thread kBob
On Jul 27, 4:56 pm, MRAB pyt...@mrabarnett.plus.com wrote: kBob wrote: On Jul 27, 4:23 pm, MRAB pyt...@mrabarnett.plus.com wrote: kBob wrote:  I created a script to access weather satellite imagery fron NOAA's ADDS.  It worked fine until recently with Python 2.6.  The company changed

Re: Why is there no platform independent way of clearing a terminal?

2010-07-28 Thread Emile van Sebille
On 7/28/2010 4:23 AM Daniel Fetchinson said... Okay, that makes perfect sense, thanks for the exaplanation! I'll just live with the platform.system( ) check for this particular problem then. If all else fails, repeating 24 (or 40,60?) lines feeds clears the screen cross platform. Emile

Re: Why is there no platform independent way of clearing a terminal?

2010-07-28 Thread Jonathan Hartley
On Jul 28, 8:08 am, Ulrich Eckhardt eckha...@satorlaser.com wrote: Daniel Fetchinson wrote: After getting the technicalities out of the way, maybe I should have asked: Is it only me or others would find a platform independent python API to clear the terminal useful? There are two kinds

Re: Nice way to cast a homogeneous tuple

2010-07-28 Thread Carl Banks
On Jul 28, 7:32 am, Steven D'Aprano st...@remove-this- cybersource.com.au wrote: On Wed, 28 Jul 2010 09:35:52 -0400, wheres pythonmonks wrote: Thanks ... I thought int was a type-cast (like in C++) so I assumed I couldn't reference it. Python doesn't have type-casts in the sense of tell the

Re: Why is there no platform independent way of clearing a terminal?

2010-07-28 Thread Jonathan Hartley
On Jul 28, 4:45 pm, Jonathan Hartley tart...@tartley.com wrote: On Jul 28, 8:08 am, Ulrich Eckhardt eckha...@satorlaser.com wrote: Daniel Fetchinson wrote: After getting the technicalities out of the way, maybe I should have asked: Is it only me or others would find a platform

Re: Why is there no platform independent way of clearing a terminal?

2010-07-28 Thread Neil Cerutti
On 2010-07-28, Jonathan Hartley tart...@tartley.com wrote: I want to write a quick script which, notices whenever I save my source code, and re-runs the unit tests, displaying the output. I think I'd like it to clear the terminal before each re-run of the tests, so that it's immediately

Re: urllib timeout

2010-07-28 Thread kBob
On Jul 28, 9:11 am, kBob krd...@gmail.com wrote: On Jul 27, 4:56 pm, MRAB pyt...@mrabarnett.plus.com wrote: kBob wrote: On Jul 27, 4:23 pm, MRAB pyt...@mrabarnett.plus.com wrote: kBob wrote:  I created a script to access weather satellite imagery fron NOAA's ADDS.  It

Re: Why is there no platform independent way of clearing a terminal?

2010-07-28 Thread Thomas Jollans
On 07/28/2010 06:01 PM, Jonathan Hartley wrote: Oh, plus, while we're on this subject: Am I right that curses in Python stdlib doesn't work on Windows, and there is currently no simple way to fix this? Also, is it crazy to imagine that if colorama was pushed through to completion (ie.

Linear nterpolation in 3D

2010-07-28 Thread hardi
Hi, I'm trying to interpolate a 3D data (from the pic attached) with the interp2d command. What I have, are three vectors f, z, A (x, y, z respectively, A is the percentage data given on the isolines). I first put the f and z in a meshgrid and afterwards in the griddata to get a 3D-grid then

Re: Why is there no platform independent way of clearing a terminal?

2010-07-28 Thread Jonathan Hartley
On Jul 28, 5:47 pm, Thomas Jollans tho...@jollans.com wrote: On 07/28/2010 06:01 PM, Jonathan Hartley wrote: Oh, plus, while we're on this subject: Am I right that curses in Python stdlib doesn't work on Windows, and there is currently no simple way to fix this? Also, is it crazy to

Re: hasattr + __getattr__: I think this is Python bug

2010-07-28 Thread Ethan Furman
Bruno Desthuilliers wrote: Ethan Furman a écrit : Bruno Desthuilliers wrote: Bruno Desthuilliers a écrit : Ethan Furman a écrit : Bruno Desthuilliers wrote: Duncan Booth a écrit : (snip) Or you could create the default as a class attribute from the OP: I have a class (FuncDesigner

Re: Why is there no platform independent way of clearing a terminal?

2010-07-28 Thread Thomas Jollans
On 07/28/2010 07:02 PM, Jonathan Hartley wrote: On Jul 28, 5:47 pm, Thomas Jollans tho...@jollans.com wrote: On 07/28/2010 06:01 PM, Jonathan Hartley wrote: Oh, plus, while we're on this subject: Am I right that curses in Python stdlib doesn't work on Windows, and there is currently no

Re: Linear nterpolation in 3D

2010-07-28 Thread Chris Rebert
On Wed, Jul 28, 2010 at 9:57 AM, hardi schraba...@web.de wrote: Hi, I'm trying to interpolate a 3D data (from the pic attached) with the interp2d command. What I have, are three vectors f, z, A (x, y, z respectively, A is the percentage data given on the isolines). I first put the f and z in

Re: urllib timeout

2010-07-28 Thread Chris Rebert
On Wed, Jul 28, 2010 at 9:30 AM, kBob krd...@gmail.com wrote: On Jul 28, 9:11 am, kBob krd...@gmail.com wrote: snip The connection problem has to do with the proxy settings.  In order for me to use Internet Explorer, the LAN's Automatic configuration must be turned on and use a script found

Re: Why is there no platform independent way of clearing a terminal?

2010-07-28 Thread Neil Cerutti
On 2010-07-28, Jonathan Hartley tart...@tartley.com wrote: And Neil Cerutti, I think I'll just email the whole source tree to myself, and have a script that scans my inbox, unzips source trees and runs their tests. Much nicer. :-) Don't forget to clear the screen, though. That ties the whole

Re: urllib timeout

2010-07-28 Thread John Nagle
On 7/27/2010 2:36 PM, kBob wrote: I created a script to access weather satellite imagery fron NOAA's ADDS. It worked fine until recently with Python 2.6. The company changed the Internet LAN connections to Accept Automatic settings and Use automatic configuration script How do you

Ascii to Unicode.

2010-07-28 Thread Joe Goldthwaite
Hi, I've got an Ascii file with some latin characters. Specifically \xe1 and \xfc. I'm trying to import it into a Postgresql database that's running in Unicode mode. The Unicode converter chokes on those two characters. I could just manually replace those to characters with something valid but

Re: Ascii to Unicode.

2010-07-28 Thread MRAB
Joe Goldthwaite wrote: Hi, I've got an Ascii file with some latin characters. Specifically \xe1 and \xfc. I'm trying to import it into a Postgresql database that's running in Unicode mode. The Unicode converter chokes on those two characters. I could just manually replace those to

Re: Ascii to Unicode.

2010-07-28 Thread Thomas Jollans
On 07/28/2010 08:32 PM, Joe Goldthwaite wrote: Hi, I've got an Ascii file with some latin characters. Specifically \xe1 and \xfc. I'm trying to import it into a Postgresql database that's running in Unicode mode. The Unicode converter chokes on those two characters. I could just manually

Re: Ascii to Unicode.

2010-07-28 Thread John Nagle
On 7/28/2010 11:32 AM, Joe Goldthwaite wrote: Hi, I've got an Ascii file with some latin characters. Specifically \xe1 and \xfc. I'm trying to import it into a Postgresql database that's running in Unicode mode. The Unicode converter chokes on those two characters. I could just manually

Re: Ascii to Unicode.

2010-07-28 Thread Thomas Jollans
On 07/28/2010 09:29 PM, John Nagle wrote: for rawline in input : unicodeline = unicode(line,'latin1')# Latin-1 to Unicode output.write(unicodeline.encode('utf-8')) # Unicode to as UTF-8 you got your blocks wrong. -- http://mail.python.org/mailman/listinfo/python-list

Re: Why is there no platform independent way of clearing a terminal?

2010-07-28 Thread Tim Harig
On 2010-07-28, Thomas Jollans tho...@jollans.com wrote: It might be possible to write a curses-compatible library that works with cmd.exe. Maybe. But, even if it's possible, I don't think it's easy, and I especially don't think it would be particularly rewarding.

Re: Why is there no platform independent way of clearing a terminal?

2010-07-28 Thread Martin Gregorie
On Wed, 28 Jul 2010 09:01:38 -0700, Jonathan Hartley wrote: Also, is it crazy to imagine that if colorama was pushed through to completion (ie. to support a majority of the relevant ANSI codes) then Python's stdlib curses module, unmodified, would suddenly just work on Windows? (after a call

Re: newb

2010-07-28 Thread geremy condra
On Wed, Jul 28, 2010 at 5:50 AM, whitey m...@here.com wrote: On Tue, 27 Jul 2010 19:19:59 -0700, Mithrandir wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 07/27/2010 04:07 AM, whitey wrote: hi all. am totally new to python and was wondering if there are any newsgroups that are

Re: Ascii to Unicode.

2010-07-28 Thread John Machin
On Jul 29, 4:32 am, Joe Goldthwaite j...@goldthwaites.com wrote: Hi, I've got an Ascii file with some latin characters. Specifically \xe1 and \xfc.  I'm trying to import it into a Postgresql database that's running in Unicode mode. The Unicode converter chokes on those two characters. I

Re: urllib timeout

2010-07-28 Thread kBob
On Jul 28, 12:44 pm, John Nagle na...@animats.com wrote: On 7/27/2010 2:36 PM, kBob wrote:   I created a script to access weather satellite imagery fron NOAA's ADDS.   It worked fine until recently with Python 2.6.   The company changed the Internet LAN connections to Accept

Tabular Package: importing file

2010-07-28 Thread Robert Faryabi
Hi there; I'm using Tabular Package for manipulating tab-delimited data. There is a small problem that I cannot get my head around it. When I construct my tabarray from file, the black fields are replaced by nan. Does any one knows how to just keep them as empty string (ie. ' ')? Thanks, -R --

Re: python terminology on classes

2010-07-28 Thread Terry Reedy
On 7/27/2010 1:28 PM, John Nagle wrote: Python 2.6 has a recently added with clause, borrowed from LISP, for associating actions with scopes. This is supported for files and locks, but setting your own object up for with requires adding special methods to the object. with is less convenient and

Ascii to Unicode.

2010-07-28 Thread Joe Goldthwaite
Thanks to all of you who responded. I guess I was working from the wrong premise. I was thinking that a file could write any kind of data and that once I had my Unicode string, I could just write it out with a standard file.write() operation. What is actually happening is the file.write()

RE: Ascii to Unicode.

2010-07-28 Thread Joe Goldthwaite
Hello hello ... you are running on Windows; the likelihood that you actually have data encoded in latin1 is very very small. Follow MRAB's answer but replace latin1 by cp1252. I think you're right. The database I'm working with is a US zip code database. It gets updated monthly. The problem

Newbie question regarding SSL and certificate verification

2010-07-28 Thread Jeffrey Gaynor
Hi, I am making a first large project in python and am having quite a bit of difficulty unscrambling various python versions and what they can/cannot do. To wit, I must communicate with certain services via https and am required to perform certificate verification on them. The problem is

Newbie question regarding SSL and certificate verification

2010-07-28 Thread geremy condra
On Wed, Jul 28, 2010 at 4:41 PM, Jeffrey Gaynor jgay...@ncsa.uiuc.edu wrote: Hi, I am making a first large project in python and am having quite a bit of difficulty unscrambling various python versions and what they can/cannot do. To wit, I must communicate with certain services via https

Performance ordered dictionary vs normal dictionary

2010-07-28 Thread Navkirat Singh
Hi guys, I was wondering what would be better to do some medium to heavy book keeping in memory - Ordered Dictionary or a plain simple Dictionary object?? Regards, N4v -- http://mail.python.org/mailman/listinfo/python-list

Function parameter scope

2010-07-28 Thread Navkirat Singh
Hi, I had another question: What is the scope of a parameter passed to a function? I know its a very basic question, but I am just sharpening my basics :) def func_something(x) return print(x+1); Does x become a local variable or does it stay as a module scoped variable? Though I

Re: Performance ordered dictionary vs normal dictionary

2010-07-28 Thread Chris Rebert
On Wed, Jul 28, 2010 at 6:47 PM, Navkirat Singh navkir...@gmail.com wrote: Hi guys, I was wondering what would be better to do some medium to heavy book keeping in memory - Ordered Dictionary or a plain simple Dictionary object?? Your question is rather vague. Define book keeping. Why do you

Re: Function parameter scope

2010-07-28 Thread Chris Rebert
On Wed, Jul 28, 2010 at 7:00 PM, Navkirat Singh navkir...@gmail.com wrote: Hi, I had another question: What is the scope of  a parameter passed to a function? I know its a very basic question, but I am just sharpening my basics :) def func_something(x)        return print(x+1); Does x

Re: Nice way to cast a homogeneous tuple

2010-07-28 Thread Steven D'Aprano
On Wed, 28 Jul 2010 08:47:52 -0700, Carl Banks wrote: On Jul 28, 7:32 am, Steven D'Aprano st...@remove-this- cybersource.com.au wrote: On Wed, 28 Jul 2010 09:35:52 -0400, wheres pythonmonks wrote: Thanks ... I thought int was a type-cast (like in C++) so I assumed I couldn't reference it.

Re: Function parameter scope

2010-07-28 Thread Steven D'Aprano
On Thu, 29 Jul 2010 07:30:34 +0530, Navkirat Singh wrote: Hi, I had another question: What is the scope of a parameter passed to a function? I know its a very basic question, but I am just sharpening my basics :) def func_something(x) return print(x+1); Does x become a local

Re: Ascii to Unicode.

2010-07-28 Thread Steven D'Aprano
On Wed, 28 Jul 2010 15:58:01 -0700, Joe Goldthwaite wrote: This still seems odd to me. I would have thought that the unicode function would return a properly encoded byte stream that could then simply be written to disk. Instead it seems like you have to re-encode the byte stream to some

Re: Performance ordered dictionary vs normal dictionary

2010-07-28 Thread sturlamolden
On 29 Jul, 03:47, Navkirat Singh navkir...@gmail.com wrote: I was wondering what would be better to do some medium to heavy book keeping in memory - Ordered Dictionary or a plain simple Dictionary object?? It depends on the problem. A dictionary is a hash table. An ordered dictionary is a

Re: Performance ordered dictionary vs normal dictionary

2010-07-28 Thread Navkirat Singh
On 29-Jul-2010, at 9:36 AM, sturlamolden wrote: On 29 Jul, 03:47, Navkirat Singh navkir...@gmail.com wrote: I was wondering what would be better to do some medium to heavy book keeping in memory - Ordered Dictionary or a plain simple Dictionary object?? It depends on the problem. A

Re: Newbie question regarding SSL and certificate verification

2010-07-28 Thread John Nagle
On 7/28/2010 6:26 PM, geremy condra wrote: On Wed, Jul 28, 2010 at 4:41 PM, Jeffrey Gaynorjgay...@ncsa.uiuc.edu wrote: Hi, I am making a first large project in python and am having quite a bit of difficulty unscrambling various python versions and what they can/cannot do. To wit, I must

Re: Newbie question regarding SSL and certificate verification

2010-07-28 Thread geremy condra
On Wed, Jul 28, 2010 at 10:08 PM, John Nagle na...@animats.com wrote: On 7/28/2010 6:26 PM, geremy condra wrote: On Wed, Jul 28, 2010 at 4:41 PM, Jeffrey Gaynorjgay...@ncsa.uiuc.edu  wrote: Hi, I am making a first large project in python and am having quite a bit of difficulty

Re: Nice way to cast a homogeneous tuple

2010-07-28 Thread John Nagle
On 7/28/2010 7:32 AM, Steven D'Aprano wrote: On Wed, 28 Jul 2010 09:35:52 -0400, wheres pythonmonks wrote: Thanks ... I thought int was a type-cast (like in C++) so I assumed I couldn't reference it. Python doesn't have type-casts in the sense of tell the compiler to treat object of type A

[issue9301] urllib.quote(None) returns None in 2.7 (raised TypeError before)

2010-07-28 Thread Florent Xicluna
Florent Xicluna florent.xicl...@gmail.com added the comment: 1/ The AttributeError on unquote() is backward compatible with 2.6, 2.7 and 3.1. (issue 9301 is about backward compatibility) 2/ All the quote*/unquote* functions accept both str and bytes (except quote_from_bytes). I don't find a

[issue9299] os.makedirs(): Add a keyword argument to suppress File exists exception

2010-07-28 Thread Ray.Allen
Ray.Allen ysj@gmail.com added the comment: I updated the patch. Now the patch: suppress the OSError if and only if the target directory with the same mode as we specified already exists. -- ___ Python tracker rep...@bugs.python.org

[issue7198] csv.writer

2010-07-28 Thread Skip Montanaro
Skip Montanaro s...@pobox.com added the comment: Can you provide me with a concrete example which fails for you? I don't have ready access to a Windows machine with Python on it but should be able to arrange something at work, however before going through the exercise of spending admin time to

[issue9354] file_wrapper fails to provide getsockopt()

2010-07-28 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Applied in r83201. Thanks! -- nosy: +georg.brandl resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9354

[issue1682942] ConfigParser support for alt delimiters

2010-07-28 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Looks good to me. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1682942 ___ ___

[issue9362] Make exit/quit hint more novice friendly

2010-07-28 Thread anatoly techtonik
anatoly techtonik techto...@gmail.com added the comment: Why not to ship it in Python by default? Because it is under GPL? pyreadline is under BSD. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9362

[issue9362] Make exit/quit hint more novice friendly

2010-07-28 Thread anatoly techtonik
anatoly techtonik techto...@gmail.com added the comment: On Mon, Jul 26, 2010 at 11:48 PM, Mark Lawrence rep...@bugs.python.org wrote: This to me is getting stupid.  Let's make a decision and move on, there are far more pressing issues that need attention. Do you think that getting

[issue9362] Make exit/quit hint more novice friendly

2010-07-28 Thread Tim Golden
Tim Golden m...@timgolden.me.uk added the comment: Not necessarily; pyreadline takes over from the standard console functionality on Windows in order to emulate a more Unix-ish approach. I prefer the Windows default. There's nothing to stop someone downloading and installing pyreadline as a

[issue9393] shelve.open/bsddb.hashopen raise Exception'No such file or directory'for Chinese path

2010-07-28 Thread wjm251
New submission from wjm251 wjm...@gmail.com: Windows XP Simple Chinese Version in python2.5,Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit (Intel)] on win32 I have a directory D:\你好新建文件夹 my code is as follows: #-- temppath =

[issue9394] shelve.open/bsddb.hashopen raise bsddb.db.DBNoSuchFileError: (2, 'No such file or directory') with Chinese Path

2010-07-28 Thread wjm251
New submission from wjm251 wjm...@gmail.com: Windows XP Simple Chinese Version in python2.5,Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit (Intel)] on win32 I have a directory D:\你好新建文件夹 my code is as follows: #-- temppath =

[issue9394] shelve.open/bsddb.hashopen raise bsddb.db.DBNoSuchFileError: (2, 'No such file or directory') with Chinese Path

2010-07-28 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- resolution: - duplicate stage: - committed/rejected status: open - closed superseder: - shelve.open/bsddb.hashopen raise Exception'No such file or directory'for Chinese path ___ Python tracker

[issue9393] shelve.open/bsddb.hashopen exception with unicode paths

2010-07-28 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: +haypo title: shelve.open/bsddb.hashopen raise Exception'No such file or directory'for Chinese path - shelve.open/bsddb.hashopen exception with unicode paths type: - behavior ___ Python tracker

[issue9386] Bad indentation in urllib import fixer with multiple imports

2010-07-28 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: +benjamin.peterson, merwok ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9386 ___ ___

[issue818201] distutils: clean does not use build_base option from build

2010-07-28 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- assignee: - tarek nosy: +merwok stage: - unit test needed title: distutils: clean -b ignored; set_undefined_options doesn't - distutils: clean does not use build_base option from build type: - behavior versions: -Python 2.3

[issue809846] distutils/bdistwin32 doesn't clean up RO files properly

2010-07-28 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- assignee: - tarek nosy: +merwok stage: - unit test needed type: - behavior versions: -Python 2.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue809846

[issue9395] clean does not remove all temp files

2010-07-28 Thread Éric Araujo
New submission from Éric Araujo mer...@netwok.org: The clean command does not delete all build artifacts. -- assignee: tarek components: Distutils, Distutils2 messages: 111781 nosy: exarkun, merwok, tarek priority: normal severity: normal stage: unit test needed status: open title:

[issue5006] Duplicate UTF-16 BOM if a file is open in append mode

2010-07-28 Thread Florent Xicluna
Changes by Florent Xicluna florent.xicl...@gmail.com: -- nosy: +flox ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5006 ___ ___ Python-bugs-list

[issue5412] extend configparser to support [] syntax

2010-07-28 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: I’d find more natural to have cp['spam'] return the section (as a dict) and cp['spam']['ham'] return the value. -- nosy: +merwok ___ Python tracker rep...@bugs.python.org

[issue1682942] ConfigParser support for alt delimiters

2010-07-28 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: I made some minor remarks on rietveld, it seems they’re saved but no email has come here. -- nosy: +merwok ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1682942

[issue989712] Support using Tk without a mainloop

2010-07-28 Thread C. E. Ball
Changes by C. E. Ball ceb...@users.sf.net: -- nosy: +ceball ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue989712 ___ ___ Python-bugs-list mailing

[issue5136] Deprecating (and removing) globalcall, merge and globaleval

2010-07-28 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Guilherme, I suggest you ask about that on pydev and/or idle-dev, or just commit the addition of PendingDeprecationWarnings and wait for reactions. -- nosy: +merwok ___ Python tracker

[issue1682942] ConfigParser support for alt delimiters

2010-07-28 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Ah, the tracker does not know the address I use for Google, sorry. My comments are visible on Rietveld. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1682942

[issue5412] extend configparser to support [] syntax

2010-07-28 Thread Łukasz Langa
Łukasz Langa luk...@langa.pl added the comment: Éric, first thing: forget about the current patch because it's very much incomplete. Second thing, while I normally would agree with you about the ['section']['key'] idea, in this case the current syntax has following advantages: - we can

[issue7198] Extraneous newlines with csv.writer on Windows

2010-07-28 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Bob, can you give us some code to reproduce the problem, in the form or a unit test or even just a regular function? It will help confirm the bug and fix it. -- nosy: +merwok stage: - unit test needed title: csv.writer - Extraneous

[issue1682942] ConfigParser support for alt delimiters

2010-07-28 Thread Łukasz Langa
Changes by Łukasz Langa luk...@langa.pl: Removed file: http://bugs.python.org/file18219/issue1682942.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1682942 ___

[issue9386] Bad indentation in urllib import fixer with multiple imports

2010-07-28 Thread Ray.Allen
Ray.Allen ysj@gmail.com added the comment: I guess it's the problem with lib2to3/fixes/fix_urllib.py. Indentation is not taken into consideration when fix import. Fix it with indentation taken into consideration maybe a little complex, but here is a simple and ugly fix: when one import

[issue1682942] ConfigParser support for alt delimiters

2010-07-28 Thread Łukasz Langa
Łukasz Langa luk...@langa.pl added the comment: New patch after review by Éric Araujo. The difference between the last one and the current is cosmetic: --- Lib/configparser.py 2010-07-27 11:36:51.0 +0200 +++ Lib/configparser.py.2 2010-07-28 13:05:39.0 +0200 @@ -117,3

[issue9396] Standardise (and publish?) cache handling in standard library

2010-07-28 Thread Nick Coghlan
New submission from Nick Coghlan ncogh...@gmail.com: The standard library has several cache implementations (e.g. in re, fnmatch and ElementTree) with different cache size limiting strategies. These should be standardised and possibly even exposed for general use. Refer to python-dev

[issue1682942] ConfigParser support for alt delimiters

2010-07-28 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: I advised putting a blankline between the first line of a docstring and the rest of it, not between the docstring and the body of the function. Re. prefix, Wordnet is more precise than Collins here: “an affix that is added in front of the

[issue7198] Extraneous newlines with csv.writer on Windows

2010-07-28 Thread Bob Cannon
Bob Cannon b...@neqn.net added the comment: Eric, This issue was resolved for me by Skip Montanaro's response less than an hour after I posted it. I didn't understand why a text file had to be binary, but I no longer had a problem with extraneous. In looking back at my message 94441, I

[issue7198] Extraneous newlines with csv.writer on Windows

2010-07-28 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: If the documentation is not clear enough about requiring binary, it is a doc bug. (P.S. Please strip unneeded quotes. Thanks) -- ___ Python tracker rep...@bugs.python.org

[issue9386] Bad indentation in urllib import fixer with multiple imports

2010-07-28 Thread Ray.Allen
Ray.Allen ysj@gmail.com added the comment: When one import statement is split to two or more, we encounter this problem: the indentation of the import statements except the first one is unknown, and is difficult to fix this problem, since a import maybe in a multi-statement line, like:

  1   2   3   >