Re: WebError documentation?

2009-02-07 Thread Ron Garret
In article <498de947$0$24412$426a7...@news.free.fr>, Bruno Desthuilliers wrote: > Ron Garret a écrit : > > In article , > > Chris Rebert wrote: > > > >> On Thu, Feb 5, 2009 at 12:52 PM, Ron Garret wrote: > >>> Is there any? Where is it? Extensive Googling has proven fruitless. > >> It's no

Re: Python on TV-centric platforms

2009-02-07 Thread alex23
On Feb 8, 9:23 am, Vitaliy Yermolenko wrote: > Any chance to see Python to be ready for "Widget Development Kit (WDK) > to third-party developers to create applications and services for > viewing on TVs [...] The excellent XBMC[1] has had Python support for years. 1: http://xbmc.org/ -- http://m

Re: MacPython 2.5 IDLE font size

2009-02-07 Thread Vincent Davis
There is a option menu in idle but you may not be able to see it. Try launching idle via terminal. For me it was located /Library/Frameworks/Python/Versions/Current/bin/idle2.5 When I did this I had the option menu, I guess this is a known bug. I assume there is a font option once you get the menu.

Re: simple web app, where to start

2009-02-07 Thread Vincent Davis
Thanks http://www.cherrypy.org/ looks like a good and simple option. Thanks Vincent Davis On Sat, Feb 7, 2009 at 5:09 PM, wrote: > On Fri, Feb 06, 2009 at 09:16:02PM -0700, Vincent Davis wrote: > > I have a simple script that takes a few input values and returns a csv > file > > and a few stat

sortable table in python 3.0

2009-02-07 Thread Peter Pei
In one of my program, I used something called MultiColumnList, which is one of the sortable table widgets done in python. However 3.0 sort is different. I googled and found couple of other implementations, but all in python 3.0 -. Does anyone know any solution in 3.0? or anything that has alre

Re: Trouble with regular expressions

2009-02-07 Thread MRAB
John Machin wrote: On Feb 8, 10:15 am, MRAB wrote: John Machin wrote: On Feb 8, 1:37 am, MRAB wrote: LaundroMat wrote: Hi, I'm quite new to regular expressions, and I wonder if anyone here could help me out. I'm looking to split strings that ideally look like this: "Update: New item (Househ

Re: Python3.0 has more duplication in source code than Python2.5

2009-02-07 Thread Terry
On 2月8日, 上午8时51分, Terry wrote: > On 2月8日, 上午12时20分, Benjamin Peterson wrote: > > > Terry gmail.com> writes: > > > > On 2月7日, 下午7时10分, "Diez B. Roggisch" wrote: > > > > Do you by any chance have a few examples of these? There is a lot of > > > > idiomatic code in python to e.g. acquire and relea

Re: Python3.0 has more duplication in source code than Python2.5

2009-02-07 Thread Terry
On 2月8日, 上午12时20分, Benjamin Peterson wrote: > Terry gmail.com> writes: > > > On 2月7日, 下午7时10分, "Diez B. Roggisch" wrote: > > > Do you by any chance have a few examples of these? There is a lot of > > > idiomatic code in python to e.g. acquire and release the GIL or doing > > > refcount-stuff. If

Re: Python on TV-centric platforms

2009-02-07 Thread Diez B. Roggisch
Vitaliy Yermolenko schrieb: Hi, Any chance to see Python to be ready for "Widget Development Kit (WDK) to third-party developers to create applications and services for viewing on TVs, or to move applications to the TV from the PC viewing environment" as on http://www.intelconsumerelectronics.co

Re: Portable way to refer to the null device?

2009-02-07 Thread Jean-Paul Calderone
On Sat, 7 Feb 2009 15:56:45 -0800, n...@stinemates.org wrote: On Fri, Feb 06, 2009 at 07:32:20PM -0800, Roy Smith wrote: I need to run a command using subprocess.Popen() and have stdin connected to the null device. On unix, I would do: self.process = subprocess.Popen(argv,

Re: simple web app, where to start

2009-02-07 Thread nick
On Fri, Feb 06, 2009 at 09:16:02PM -0700, Vincent Davis wrote: > I have a simple script that takes a few input values and returns a csv file > and a few stats. If I wanted to host this on the web how would I. I have no > idea where to begin. If someone could point me in the right direction like > m

Re: Portable way to refer to the null device?

2009-02-07 Thread nick
On Fri, Feb 06, 2009 at 07:32:20PM -0800, Roy Smith wrote: > I need to run a command using subprocess.Popen() and have stdin > connected to the null device. On unix, I would do: > > self.process = subprocess.Popen(argv, > env=new_env, >

Re: Trouble with regular expressions

2009-02-07 Thread John Machin
On Feb 8, 10:15 am, MRAB wrote: > John Machin wrote: > > On Feb 8, 1:37 am, MRAB wrote: > >> LaundroMat wrote: > >>> Hi, > >>> I'm quite new to regular expressions, and I wonder if anyone here > >>> could help me out. > >>> I'm looking to split strings that ideally look like this: "Update: New >

Python on TV-centric platforms

2009-02-07 Thread Vitaliy Yermolenko
Hi, Any chance to see Python to be ready for "Widget Development Kit (WDK) to third-party developers to create applications and services for viewing on TVs, or to move applications to the TV from the PC viewing environment" as on http://www.intelconsumerelectronics.com/Consumer-Electronics-3.0/Wid

Re: Trouble with regular expressions

2009-02-07 Thread MRAB
John Machin wrote: On Feb 8, 1:37 am, MRAB wrote: LaundroMat wrote: Hi, I'm quite new to regular expressions, and I wonder if anyone here could help me out. I'm looking to split strings that ideally look like this: "Update: New item (Household)" into a group. This expression works ok: '^(Updat

MacPython 2.5 IDLE font size

2009-02-07 Thread chohazel
Hi, Is there a way to adjust the default font size in IDLE, in MacPython 2.5? The default now is too tiny. I have to use this version of MacPython. As far as I searched, I can't find how I do this. Thanks. -- http://mail.python.org/mailman/listinfo/python-list

TkInter: Problem with propagation of resize events through geometry manager hierarchy?

2009-02-07 Thread Randy Smith
Hi! I'm looking for help with a Tkinter program's handling of resize. I'm trying to do a fairly simple widget that shows a cropped part of a larger image, and let's you navigate within the larger image through a variety of methods. The widget hierarchy is: root ImageWidget (my class) Lab

Re: Newbie SWMixer / numpy help - AssertionError

2009-02-07 Thread Robert Kern
On 2009-02-07 08:46, Peter Chant wrote: Hello, I'm a bit of a python newby. I want to play and record sound simultaneously. SWMixer seems able to do this but the examples use WAV files. I'm trying to play a test tone. Can anyone give me a steer as to why this fails? Looking at the SWMixer

Re: Python3.0 has more duplication in source code than Python2.5

2009-02-07 Thread Martin v. Löwis
> yet the general tone of the responses has been more defensive than i would > have expected. i don't really understand why. nothing really terrible, > given the extremes you get on the net in general, but still a little > disappointing. I think this is fairly easy to explain. The OP closes with

Re: Flattening lists

2009-02-07 Thread mmanns
On Sat, 7 Feb 2009 12:50:22 -0800 (PST) Rhamphoryncus wrote: > On Feb 7, 1:39 pm, wrote: > > On Sat, 7 Feb 2009 01:06:06 -0800 (PST) > > Rhamphoryncus wrote: > > > > > What usecase do you have for such inconsistently structured data? > > > > I have a similar use case in pyspread, which is a Pyt

Re: Python3.0 has more duplication in source code than Python2.5

2009-02-07 Thread andrew cooke
Steve Holden wrote: >> You'd best hope the copied section was thoroughly reviewed otherwise >> you're >> duplicating a flaw across X other sections. And then you also best hope >> that >> whoever finds said flaw and fixes it is also smart enough to check for >> similar constructs around the code ba

Re: Python3.0 has more duplication in source code than Python2.5

2009-02-07 Thread Jeroen Ruigrok van der Werven
-On [20090207 21:07], Steve Holden (st...@holdenweb.com) wrote: >This is probably preferable to five different developers solving the >same problem five different ways and introducing three *different* bugs, no? I guess the answer would be 'that depends', but in most cases you

Re: py2exe and distutils

2009-02-07 Thread Maxim Demenko
Thomas Heller schrieb: Maxim Demenko schrieb: Hi, i have installed Python 2.5.4 on WinXP, setuptools-0.6c9 and py2exe 0.6.9 Now i can't list installed modules, here is the stacktrace: [...] Any suggestion, how to fix this issue? Thomas Heller schrieb: Looks like a setuptools problem to me.

Re: Python3.0 has more duplication in source code than Python2.5

2009-02-07 Thread Martin v. Löwis
> This is probably preferable to five different developers solving the > same problem five different ways and introducing three *different* bugs, no? With the examples presented, I'm not convinced that there is actually significant code duplication going on in the first place. Regards, Martin --

Re: Flattening lists

2009-02-07 Thread Rhamphoryncus
On Feb 7, 1:39 pm, wrote: > On Sat, 7 Feb 2009 01:06:06 -0800 (PST) > Rhamphoryncus wrote: > > > What usecase do you have for such inconsistently structured data? > > I have a similar use case in pyspread, which is a Python spreadsheet > that employs numpy object arrays. Since the Python objects

Re: Where to host a (Python) project?

2009-02-07 Thread alex goretoy
If you don't mind changing dns entries. You can also use Google App Engine. It's really nice. http://code.google.com/appengine/docs/python/tools/webapp/overview.html -Alex Goretoy http://www.alexgoretoy.com On Fri, Feb 6, 2009 at 1:07 AM, alex goretoy wrote: > I use google code. > http://code

Re: Trouble with regular expressions

2009-02-07 Thread John Machin
On Feb 8, 1:37 am, MRAB wrote: > LaundroMat wrote: > > Hi, > > > I'm quite new to regular expressions, and I wonder if anyone here > > could help me out. > > > I'm looking to split strings that ideally look like this: "Update: New > > item (Household)" into a group. > > This expression works ok: '

Re: Flattening lists

2009-02-07 Thread mmanns
On Sat, 7 Feb 2009 01:06:06 -0800 (PST) Rhamphoryncus wrote: > On Feb 6, 10:21 pm, rdmur...@bitdance.com wrote: > > Quoth Mensanator : > > > def flatten(listOfLists): > > >     return list(chain.from_iterable(listOfLists)) > > > >     Python 2.6.1 (r261:67515, Jan  7 2009, 17:09:13) > >     [GCC

Re: py2exe and distutils

2009-02-07 Thread Thomas Heller
> Maxim Demenko schrieb: >> Hi, >> i have installed Python 2.5.4 on WinXP, setuptools-0.6c9 and py2exe 0.6.9 >> Now i can't list installed modules, here is the stacktrace: [...] >> Any suggestion, how to fix this issue? > Thomas Heller schrieb: > Looks like a setuptools problem to me. Here's the

Re: py2exe and distutils

2009-02-07 Thread Thomas Heller
Maxim Demenko schrieb: > Hi, > i have installed Python 2.5.4 on WinXP, setuptools-0.6c9 and py2exe 0.6.9 > Now i can't list installed modules, here is the stacktrace: > > > > help> modules > > Please wait a moment while I gather a list of all available modules... > > Traceback (most recent cal

Re: Python3.0 has more duplication in source code than Python2.5

2009-02-07 Thread Steve Holden
Jeroen Ruigrok van der Werven wrote: > -On [20090207 18:25], Scott David Daniels (scott.dani...@acm.org) wrote: >> This analysis overlooks the fact that 3.0 _was_ a major change, and is >> likely to grow cut-and-paste solutions to some problems as we switch to >> Unicode stri

Re: WebError documentation?

2009-02-07 Thread Bruno Desthuilliers
Ron Garret a écrit : In article , Chris Rebert wrote: On Thu, Feb 5, 2009 at 12:52 PM, Ron Garret wrote: Is there any? Where is it? Extensive Googling has proven fruitless. It's not a standard Python exception. A third-party library you're using must be raising it. Check the exception tr

Re: Java to Python

2009-02-07 Thread Aleksandar Radulovic
Hi, On Sat, Feb 7, 2009 at 5:28 PM, zaheer agadi wrote: > Thanks Alex, > > Can you provide me more details on httplib and urllib ? The details can be found in Python documentation (http://python.org/doc), on these pages: http://docs.python.org/library/httplib.html I'm sure you can figure out t

Re: Python3.0 has more duplication in source code than Python2.5

2009-02-07 Thread Jeroen Ruigrok van der Werven
-On [20090207 18:25], Scott David Daniels (scott.dani...@acm.org) wrote: >This analysis overlooks the fact that 3.0 _was_ a major change, and is >likely to grow cut-and-paste solutions to some problems as we switch to >Unicode strings from byte strings. You'd best hope the copi

Re: isfifo?

2009-02-07 Thread rdmurray
=?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?= wrote: > rdmur...@bitdance.com wrote: > > I've googled and looked through os.path, but I don't see a method for > > determining if a path points to a FIFO. Anyone know of a simple way to > > do so? > > def isfifo(fn): > return stat.S_ISFIFO(os.stat(fn

Re: isfifo?

2009-02-07 Thread Martin v. Löwis
rdmur...@bitdance.com wrote: > I've googled and looked through os.path, but I don't see a method for > determining if a path points to a FIFO. Anyone know of a simple way to > do so? def isfifo(fn): return stat.S_ISFIFO(os.stat(fn).st_mode) HTH, Martin -- http://mail.python.org/mailman/listinf

Re: Python3.0 has more duplication in source code than Python2.5

2009-02-07 Thread Martin v. Löwis
> But the duplication are always not very big, from about 100 lines > (rare) to less the 5 lines. As you can see the Rate30 is much bigger > than Rate60, that means there are a lot of small duplications. I don't find that important for code quality. It's the large chunks that I would like to see d

Re: Python3.0 has more duplication in source code than Python2.5

2009-02-07 Thread Martin v. Löwis
> And I'm not saying that you can not have duplication in code. But it > seems that the stable & successful software releases tend to have > relatively stable duplication rate. So if some software has an instable duplication rate, it probably means that it is either not stable, or not successful.

Re: "Weird" Indentation? (Or: is there a for...else construct?)

2009-02-07 Thread andrew cooke
there's a justification for this awful mess here - http://mail.python.org/pipermail/python-3000/2006-March/000104.html i didn't know about this, and even after reading steven's broken (i assume) example, managed to get it backwards. the else is if there *isn't* a break and is for search loops (s

Re: Python3.0 has more duplication in source code than Python2.5

2009-02-07 Thread Scott David Daniels
Terry wrote: ... I'm not saying that you can not have duplication in code. But it seems that the stable & successful software releases tend to have relatively stable duplication rate. This analysis overlooks the fact that 3.0 _was_ a major change, and is likely to grow cut-and-paste solutions t

Re: isfifo?

2009-02-07 Thread Albert Hopkins
On Sat, 2009-02-07 at 17:12 +, rdmur...@bitdance.com wrote: > I've googled and looked through os.path, but I don't see a method for > determining if a path points to a FIFO. Anyone know of a simple way to > do so? import os import stat st_mode = os.stat(path)[0] isfifo = stat.S_ISFIFO(st_mod

isfifo?

2009-02-07 Thread rdmurray
I've googled and looked through os.path, but I don't see a method for determining if a path points to a FIFO. Anyone know of a simple way to do so? --RDM -- http://mail.python.org/mailman/listinfo/python-list

Re: Java to Python

2009-02-07 Thread Aleksandar Radulovic
Hi, This looks like a perfect job for httplib and urllib2 modules. On Sat, Feb 7, 2009 at 4:49 PM, zaheer agadi wrote: > Hi Thanks for replying .. > I am actually looking for the pure Python options > > Are there any equivalent clasees for the following > > import org.apache.commons.httpclient.

Re: Java to Python

2009-02-07 Thread zaheer agadi
Hi Thanks for replying .. I am actually looking for the pure Python options Are there any equivalent clasees for the following import org.apache.commons.httpclient.HttpClient; import org.apache.commons.httpclient.HttpException; import org.apache.commons.httpclient.contrib.ssl.EasySSLProtocolSock

Beginner Python OpenGL difficulties

2009-02-07 Thread David Nuttall
Hi Mike, I am just getting into OPENGL from Python. But I am having problems. Each time I try to run some OPENGL code I get the following sort of error: Traceback (most recent call last): File "C:\Documents and Settings\Owner\My Documents\My Work\Python Modules\PyOpenGL-Demo-3.0

Re: Java to Python

2009-02-07 Thread Banibrata Dutta
Jython is not an option ? On Sat, Feb 7, 2009 at 9:54 PM, wrote: > Hi > > I have a following class that is written Java and makes use of apache > http client library,I am new to python can any one suggest me a python > equivalent of this following class, > > Thanks , > > public class Authenticat

Java to Python

2009-02-07 Thread zaheer . agadi
Hi I have a following class that is written Java and makes use of apache http client library,I am new to python can any one suggest me a python equivalent of this following class, Thanks , public class Authenticate{ private String storageUserName=null; private String storagePassword=null;

Re: Python3.0 has more duplication in source code than Python2.5

2009-02-07 Thread Benjamin Peterson
Terry gmail.com> writes: > On 2月7日, 下午7时10分, "Diez B. Roggisch" wrote: > > Do you by any chance have a few examples of these? There is a lot of > > idiomatic code in python to e.g. acquire and release the GIL or doing > > refcount-stuff. If that happens to be done with rather generic names as > >

Re: Tkinter w.pack()?

2009-02-07 Thread W. eWatson
MRAB wrote: W. eWatson wrote: ... I thought some months ago, I found Google commands that would operate in the browser link window. Guess not. BTW, isn't there an O'Reilly book on Google hacks of this sort? Where else does one find out about these Google tools? Google? :-) http://www.goo

Re: "Weird" Indentation? (Or: is there a for...else construct?)

2009-02-07 Thread Diez B. Roggisch
Peter Otten schrieb: Andreas Waldenburger wrote: I've found something in the spirit of the following (in the epydoc sources, if you care): if True: print "outer if" for t in range(2): if True: print "for if" else: print "phantom else" For the life of me

Re: Is c.l.py becoming less friendly?

2009-02-07 Thread floatingpeanut
On Feb 7, 2:37 am, Terry Reedy wrote: >   So I think python-list has become more friendly since. I've experienced the same sort of thing. About a year ago (I think) there were one or more regulars here who were often somewhat rude, unfriendly, or snobbish (not naming any names). Trouble was, they

BaseHTTPRequestHandler freezes while writing to self.wfile after installing Python 3.0

2009-02-07 Thread mail
Hey guys, I'm starting to lose my head with this one. I have a class that extends BaseHTTPRequestHandler. It works fine on Python 2.5. And yesterday I was curious and decided to install Python 3.0 on my Mac (I followed this tutorial, to be sure I wasn't messing things up: http://farmdev.com/thou

Newbie SWMixer / numpy help - AssertionError

2009-02-07 Thread Peter Chant
Hello, I'm a bit of a python newby. I want to play and record sound simultaneously. SWMixer seems able to do this but the examples use WAV files. I'm trying to play a test tone. Can anyone give me a steer as to why this fails? import sys import swmixer import numpy swmixer.init(samplerate=4

Re: "Weird" Indentation? (Or: is there a for...else construct?)

2009-02-07 Thread MRAB
Andreas Waldenburger wrote: On Sun, 08 Feb 2009 01:28:00 +1100 Steven D'Aprano wrote: Andreas Waldenburger wrote: It seems that there is a for...else construct. Replacing the inner if with pass seems to confirm this. The else clause is still executed. Yes, there is a for...else construct.

Re: Trouble with regular expressions

2009-02-07 Thread MRAB
LaundroMat wrote: Hi, I'm quite new to regular expressions, and I wonder if anyone here could help me out. I'm looking to split strings that ideally look like this: "Update: New item (Household)" into a group. This expression works ok: '^(Update:)?(.*)(\(.*\))$' - it returns ("Update", "New ite

Re: "Weird" Indentation? (Or: is there a for...else construct?)

2009-02-07 Thread Andreas Waldenburger
On Sun, 08 Feb 2009 01:28:00 +1100 Steven D'Aprano wrote: > Andreas Waldenburger wrote: > > > It seems that there is a for...else construct. Replacing the inner > > if with pass seems to confirm this. The else clause is still > > executed. > > Yes, there is a for...else construct. > That's som

Re: "Weird" Indentation? (Or: is there a for...else construct?)

2009-02-07 Thread Peter Otten
Andreas Waldenburger wrote: > I've found something in the spirit of the following (in the epydoc > sources, if you care): > > if True: > print "outer if" > for t in range(2): > if True: > print "for if" > else: > print "phantom else" > > For the life of me

py2exe and distutils

2009-02-07 Thread Maxim Demenko
Hi, i have installed Python 2.5.4 on WinXP, setuptools-0.6c9 and py2exe 0.6.9 Now i can't list installed modules, here is the stacktrace: help> modules Please wait a moment while I gather a list of all available modules... Traceback (most recent call last): File "", line 1, in File "C:\P

Re: "Weird" Indentation? (Or: is there a for...else construct?)

2009-02-07 Thread Steven D'Aprano
Andreas Waldenburger wrote: > It seems that there is a for...else construct. Replacing the inner if > with pass seems to confirm this. The else clause is still executed. Yes, there is a for...else construct. The else block runs if the for loop exits *without* a break. for i in range(20): if

Re: "Weird" Indentation? (Or: is there a for...else construct?)

2009-02-07 Thread Andreas Waldenburger
On Sat, 7 Feb 2009 15:21:22 +0100 Andreas Waldenburger wrote: > outer if > For if > For if > Phantom else > Geez, I'm a moron. This is obviously not the output from the snippet. But if you fix the capitalization, it is. Sorry for that. /W -- My real email address is constructed by swapping th

Re: Flattening lists

2009-02-07 Thread rdmurray
Rhamphoryncus wrote: > On Feb 6, 10:21=A0pm, rdmur...@bitdance.com wrote: > > Quoth Mensanator : > > > def flatten(listOfLists): > > > =A0 =A0 return list(chain.from_iterable(listOfLists)) > > > > =A0 =A0 Python 2.6.1 (r261:67515, Jan =A07 2009, 17:09:13) > > =A0 =A0 [GCC 4.3.2] on linux2 > > =A0

"Weird" Indentation? (Or: is there a for...else construct?)

2009-02-07 Thread Andreas Waldenburger
I've found something in the spirit of the following (in the epydoc sources, if you care): if True: print "outer if" for t in range(2): if True: print "for if" else: print "phantom else" For the life of me I can't place the "else". Which if clause does it be

Re: Trouble with regular expressions

2009-02-07 Thread John Machin
On Feb 7, 11:18 pm, LaundroMat wrote: > Hi, > > I'm quite new to regular expressions, and I wonder if anyone here > could help me out. > > I'm looking to split strings that ideally look like this: "Update: New > item (Household)" into a group. > This expression works ok: '^(Update:)?(.*)(\(.*\))$'

urllib2: problem of handling space in parameter

2009-02-07 Thread rdmurray
Quoth Muddy Coder : > Hi Folks, > > I encrountered a problem of using urllib2: the space handling. Look at > the code below: > > import urllib2 > url = r'http://somedomain.com/a.cgi?name=muddy coder&password=foobar > cgi_back = urllib2.urlopen(url).read() > > In this cgi_back, I saw field passwo

typedef (type alias) and ctypes

2009-02-07 Thread Yosifov Pavel
I try to create type aliases, like typedef in C (a specially aliases to ctypes objects). This case: >>> some_type = c_ulong >>> oth_type = c_ulong works in all cases but not with type qualification: >>> t1 = c_ulong # reference to c_ulong, nothing else :( >>> t2 = c_ulong >>> x = t1() >>> y = t2

urllib2: problem of handling space in parameter

2009-02-07 Thread Muddy Coder
Hi Folks, I encrountered a problem of using urllib2: the space handling. Look at the code below: import urllib2 url = r'http://somedomain.com/a.cgi?name=muddy coder&password=foobar cgi_back = urllib2.urlopen(url).read() In this cgi_back, I saw field password worked fine, but field name not, only

Re: Python3.0 has more duplication in source code than Python2.5

2009-02-07 Thread Terry
On 2月7日, 下午7时10分, "Diez B. Roggisch" wrote: > Terry schrieb: > > > On 2月7日, 下午3时36分, "Martin v. Löwis" wrote: > >>> Does that say something about the code quality of Python3.0? > >> Not necessarily. IIUC, copying a single file with 2000 lines > >> completely could already account for that increas

Re: Python3.0 has more duplication in source code than Python2.5

2009-02-07 Thread Terry
On 2月7日, 下午7时10分, "Diez B. Roggisch" wrote: > Terry schrieb: > > > On 2月7日, 下午3时36分, "Martin v. Löwis" wrote: > >>> Does that say something about the code quality of Python3.0? > >> Not necessarily. IIUC, copying a single file with 2000 lines > >> completely could already account for that increas

Re: Python3.0 has more duplication in source code than Python2.5

2009-02-07 Thread Terry
On 2月7日, 下午7时10分, "Diez B. Roggisch" wrote: > Terry schrieb: > > > On 2月7日, 下午3时36分, "Martin v. Löwis" wrote: > >>> Does that say something about the code quality of Python3.0? > >> Not necessarily. IIUC, copying a single file with 2000 lines > >> completely could already account for that increas

Re: Python3.0 has more duplication in source code than Python2.5

2009-02-07 Thread Terry
On 2月7日, 下午7时10分, "Diez B. Roggisch" wrote: > Terry schrieb: > > > On 2月7日, 下午3时36分, "Martin v. Löwis" wrote: > >>> Does that say something about the code quality of Python3.0? > >> Not necessarily. IIUC, copying a single file with 2000 lines > >> completely could already account for that increas

Re: Python3.0 has more duplication in source code than Python2.5

2009-02-07 Thread Terry
On 2月7日, 下午7时10分, "Diez B. Roggisch" wrote: > Terry schrieb: > > > On 2月7日, 下午3时36分, "Martin v. Löwis" wrote: > >>> Does that say something about the code quality of Python3.0? > >> Not necessarily. IIUC, copying a single file with 2000 lines > >> completely could already account for that increas

PyCon 2009 Tutorial Days

2009-02-07 Thread gslindstrom
Registration for PyCon 2009 (US) is open. Because of the popularity of the tutorials in years past, this year features 2 days of tutorials (32 total class on Wednesday, March 25 and Thursday, March 26) including: - 2

Re: Running all unit tests

2009-02-07 Thread Jason Voegele
Ben Finney wrote: > Jason Voegele writes: > >> What's the recommended approach for Python programs? I'm sure I >> could write a shell script (or a Python script even) that scans my >> "test" directory for test cases and runs them, but I'm wondering if >> there's something already built in that co

Trouble with regular expressions

2009-02-07 Thread LaundroMat
Hi, I'm quite new to regular expressions, and I wonder if anyone here could help me out. I'm looking to split strings that ideally look like this: "Update: New item (Household)" into a group. This expression works ok: '^(Update:)?(.*)(\(.*\))$' - it returns ("Update", "New item", "(Household)")

Re: Python3.0 has more duplication in source code than Python2.5

2009-02-07 Thread Diez B. Roggisch
Terry schrieb: On 2月7日, 下午3时36分, "Martin v. Löwis" wrote: Does that say something about the code quality of Python3.0? Not necessarily. IIUC, copying a single file with 2000 lines completely could already account for that increase. It would be interesting to see what specific files have gaine

Re: Python3.0 has more duplication in source code than Python2.5

2009-02-07 Thread Terry
On 2月7日, 下午3时36分, "Martin v. Löwis" wrote: > > Does that say something about the code quality of Python3.0? > > Not necessarily. IIUC, copying a single file with 2000 lines > completely could already account for that increase. > > It would be interesting to see what specific files have gained > la

Re: subprocess returncode windows

2009-02-07 Thread Duncan Booth
Andrew wrote: > As well as not using that and removing "endlocal" which > I admit I have no clue what that does. Python isn't the only system in the world to include a help command. C:\>help endlocal Ends localization of environment changes in a batch file. Environment changes made after ENDLOC

Re: urllib2 performance on windows, usb connection

2009-02-07 Thread dq
MRAB wrote: dq wrote: MRAB wrote: dq wrote: dq wrote: MRAB wrote: dq wrote: Martin v. Löwis wrote: So does anyone know what the deal is with this? Why is the same code so much slower on Windows? Hope someone can tell me before a holy war erupts :-) Only the holy war can give an answer

Re: Flattening lists

2009-02-07 Thread Rhamphoryncus
On Feb 6, 10:21 pm, rdmur...@bitdance.com wrote: > Quoth Mensanator : > > def flatten(listOfLists): > >     return list(chain.from_iterable(listOfLists)) > >     Python 2.6.1 (r261:67515, Jan  7 2009, 17:09:13) >     [GCC 4.3.2] on linux2 >     Type "help", "copyright", "credits" or "license" for m

Re: Is c.l.py becoming less friendly?

2009-02-07 Thread James Stroud
Tim Chase wrote: Is this where we tell you to shut up? ;-) Don't you mean STFU? -- James Stroud UCLA-DOE Institute for Genomics and Proteomics Box 951570 Los Angeles, CA 90095 http://www.jamesstroud.com -- http://mail.python.org/mailman/listinfo/python-list

Re: WebError documentation?

2009-02-07 Thread Ron Garret
In article , Chris Rebert wrote: > On Thu, Feb 5, 2009 at 12:52 PM, Ron Garret wrote: > > Is there any? Where is it? Extensive Googling has proven fruitless. > > It's not a standard Python exception. A third-party library you're > using must be raising it. Check the exception traceback. I s