Newbie question

2008-11-06 Thread Joe Hays
I'm a newbie to python. Can anyone tell me why the following little program complains about incorrect dimensions? import pylab from pylab import * n = 10; m = 2*n; A = randn(m,n); b = A*rand(n,1) + 2*rand(m,1); The actual error I receive is, b = A*rand(n,1) + 2*rand(m,1); ValueError: shape

etymology of "list comprehension"?

2008-11-06 Thread mh
I googled and wiki'ed, but couldn't find a concise clear answer as to how python "list comprehensions" got their name. Who picked the name? What was the direct inspiration, another language? What language was the first to have such a construct? I get that it's based on set notation. Thanks! Ma

Re: Finding the instance reference of an object

2008-11-06 Thread Aaron Brady
On Nov 6, 1:44 pm, Arnaud Delobelle <[EMAIL PROTECTED]> wrote: > I know this thread has grown quite personal for some of its > participants.  I am posting in a spirit of peace and understanding :) Hear, hear. > You refer to docs about the *implementation* of Python in C.  This is > irrelevant. >

Re: etymology of "list comprehension"?

2008-11-06 Thread Chris Rebert
On Thu, Nov 6, 2008 at 1:19 PM, <[EMAIL PROTECTED]> wrote: > I googled and wiki'ed, but couldn't find a concise clear answer > as to how python "list comprehensions" got their name. > > Who picked the name? What was the direct inspiration, another > language? What language was the first to have

PySqlite - division of real numbers without decimal fractions

2008-11-06 Thread Astley Le Jasper
I've been getting errors recently when using pysqlite. I've declared the table columns as real numbers to 2 decimal places (I'm dealing with money), but when doing division on two numbers that happen to have no decimal fractions, the results through pysqlite are coming through as integers. The funn

Re: Cisco's $100,000 Developer Contest

2008-11-06 Thread James Mills
On Fri, Nov 7, 2008 at 7:15 AM, Guido van Rossum <[EMAIL PROTECTED]> wrote: > This seems of interest to Python developers all over the world. > Develop a Python app to run on a Cisco router and win real money! On any Cisco ISR ? Any particular product/version ? --JamesMills -- -- -- "Problems a

Re: Plz help..SocketServer UDP server losing lots of packets

2008-11-06 Thread James Mills
On Fri, Nov 7, 2008 at 1:43 AM, Ben Sizer <[EMAIL PROTECTED]> wrote: > On Nov 6, 12:46 am, "James Mills" <[EMAIL PROTECTED]> > wrote: >> >> Try these instead: >> * UDPServer >> ->http://trac.softcircuit.com.au/circuits/browser/examples/udpserver.py >> * UDPClient >> ->http://trac.softcircuit.c

Re: More __init__ methods

2008-11-06 Thread Ben Finney
Larry Bates <[EMAIL PROTECTED]> writes: > Is there some reason not to use something like the following? > > class foo: > def __init__(self, val): > self.a = 0 > self.b = 0 > > if isinstance(val, basestring): > # > # do something to calculate "a

Re: Rewriting a bash script in python

2008-11-06 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Tim Rowe wrote: > Actually, there's quite a lot wrong with rapid prototyping, but there's > quite a lot wrong with all other requirements capture methodologies too, > so rapid prototyping is up there with the rest of them. Sounds like what Churchill said about demo

Re: More __init__ methods

2008-11-06 Thread Ben Finney
Arnaud Delobelle <[EMAIL PROTECTED]> writes: > Ben Finney <[EMAIL PROTECTED]> writes: > [...] > > All you need to know to understand the above is that it will have > > essentially the same result as: > > > > class A(object): > > # ... > > > > def _from_string(cls, s): > >

Re: Newbie question

2008-11-06 Thread Robert Kern
Joe Hays wrote: I'm a newbie to python. Can anyone tell me why the following little program complains about incorrect dimensions? import pylab from pylab import * n = 10; m = 2*n; A = randn(m,n); b = A*rand(n,1) + 2*rand(m,1); The actual error I receive is, b =

Extending Logger

2008-11-06 Thread polettog
Hi, I took a look to the logging module which was quite sexy at a first sight, but then i finally realized the following : the Logger class can't be extended since a Logger is created only with getLogger (the subclass can't call/shouldn't call Logger.__init__()). So, did i miss something? or maybe

Re: etymology of "list comprehension"?

2008-11-06 Thread mh
Chris Rebert <[EMAIL PROTECTED]> wrote: > the term > "comprehension" for the concept was first used in the NPL programming > language (Wikipedia again). Ah, thanks... and does "comprehension" have any special computer science meaning? -- Mark Harrison Pixar Animation Studios -- http://mail.pytho

Re: List to Text back to List

2008-11-06 Thread John Machin
On Nov 7, 7:04 am, SimonPalmer <[EMAIL PROTECTED]> wrote: > Hi, I am looking for a way to convert a List of floating point numbers > to and from text.  I am embedding it in an XML document and am looking > for a neat way to serialise and de-serialise a list from a text node. > I can easily write so

Accessing POST parameters from BaseHTTPServer

2008-11-06 Thread James
Hi all, I'm writing a super simple little debugging HTTP server which simply returns the path and parameters it receives requests for. E.g. requesting /meth?a=b returns something like: Command: GET Path: /meth Params: {'a': ['b']} This is fine for GET, but I can't see how I access parameters pass

Re: Weird behavior with lexical scope

2008-11-06 Thread Terry Reedy
[EMAIL PROTECTED] wrote: On Nov 6, 9:57 pm, mrstevegross <[EMAIL PROTECTED]> wrote: I ran into a weird behavior with lexical scope in Python. I'm hoping someone on this forum can explain it to me. Here's the situation: I have an Outer class. In the Outer class, I define a nested class 'Inner' w

Can read() be non-blocking?

2008-11-06 Thread Thomas Christensen
This issue has been raised a couple of times I am sure. But I have yet to find a satisfying answer. I am reading from a subprocess and this subprocess sometimes hang, in which case a call to read() call will block indefinite, keeping me from killing it. The folloing sample code illustrates the p

Trouble with getdefaultlocale on Mac

2008-11-06 Thread Pierre-Alain Dorange
Hello, To internationalize a small game, i'm trying to use locale.getdefaultlocale() or locale.getlocale(). On my Mac at home, it return '(none,xxx)' difficult to determine the user language... At home : MacOS X 10.4.11 / Python 2.5.2 (user install, default was 2.3.2). I try with the original s

Re: Extending Logger

2008-11-06 Thread Thomas Christensen
[EMAIL PROTECTED] writes: > I took a look to the logging module which was quite sexy at a first > sight, but then i finally realized the following : the Logger class > can't be extended since a Logger is created only with getLogger (the > subclass can't call/shouldn't call Logger.__init__()). > So

Re: Python25\Tools\checkversions.py

2008-11-06 Thread Martin v. Löwis
Colin J. Williams wrote: > Is _checkversion.py used at all currently? I don't think so. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

2009 Python class schedule

2008-11-06 Thread Mark Lutz
A page describing our 2009 Python class offerings has just been posted here: http://home.earthlink.net/~python-training/2009-public-classes.htm The first class in 2009 will be held January 27-30 in Colorado, and is now open for enrollments. These are public classes, open to individuals. They pr

Re: 2.6, 3.0, and truly independent intepreters

2008-11-06 Thread Walter Overby
On Nov 6, 2:03 pm, sturlamolden <[EMAIL PROTECTED]> wrote: > On Nov 6, 6:05 pm, Walter Overby <[EMAIL PROTECTED]> wrote: > > > I don't understand how this would help.  If these large data > > structures reside only in one remote process, then the overhead of > > proxying the data into another proce

Re: Finding the instance reference of an object

2008-11-06 Thread Joe Strout
On Nov 5, 2008, at 2:06 PM, Lie wrote: I'm fed up with you. I'm sorry -- I'm really not trying to be difficult. And it's odd that you're fed up with me, yet you seem to be agreeing with me on at least most points. In Von Neumann Architectur

Re: Finding the instance reference of an object

2008-11-06 Thread Joe Strout
On Nov 6, 2008, at 12:44 PM, Arnaud Delobelle wrote: I know this thread has grown quite personal for some of its participants. I am posting in a spirit of peace and understanding :) Thanks, I'll do the same. Um, no, I've admitted that it's a reference all along. Indeed, that's pretty muc

Re: Finding the instance reference of an object

2008-11-06 Thread Terry Reedy
Aaron Brady wrote: and you can't have languages without implementations. This is either a claim that languages are their own implementations, or an admission that human brains are the implementation of all languages thought of by human brains, coupled with a claim that there cannot be langu

Re: etymology of "list comprehension"?

2008-11-06 Thread Terry Reedy
[EMAIL PROTECTED] wrote: I googled and wiki'ed, but couldn't find a concise clear answer as to how python "list comprehensions" got their name. Who picked the name? What was the direct inspiration, another language? What language was the first to have such a construct? I get that it's based o

convert to XMLRPC

2008-11-06 Thread Michel Perez
Que vola a todos: I have an object abstraction layer that allows me to comunicate and interact with my DB server without much problems -am thinking in possibles contributors. In the stdlib xmlrpclib handles this in a common way, but i use a customized GatewayHandler that give me the posibility t

Re: CGI Python problem

2008-11-06 Thread Tim O'Toole
With regard to phpinfo(), its shows the mod_cgi is loaded, but neither mod_perl or mod_python is loaded (I read on the python.org site that mod_python can interfere with running python through mod_python). As for writing some perl, not too sure how to do that, but from the information in phpinfo I

Re: Snippets management

2008-11-06 Thread Edwin B.
Robert Lehmann <[EMAIL PROTECTED]> writes: > I don't think there is a one-size-fits-all solution. I definetly agree. > Setting up a 'snippets' repository sounds good if you just want to be > able to look back at what you've done and/or have a place to stash away > quick tests. I have set up a

Re: Python25\Tools\checkversions.py

2008-11-06 Thread Colin J. Williams
Martin v. Löwis wrote: Colin J. Williams wrote: Is _checkversion.py used at all currently? I don't think so. Regards, Martin Martin, I suggest that consideration be given to dropping it and and versionchecker from the distribution. I see that it still appears in versions 2.6 and 3.0.

Re: False and 0 in the same dictionary

2008-11-06 Thread Paul Rubin
Prateek <[EMAIL PROTECTED]> writes: > > How about using (x, type(x)) as the key instead of just x? > Yup. I thought of that. Although it seems kinda unpythonic to do so. > Especially since the dictionary is basically a cache mostly containing > strings. Adding all the memory overhead for the extra

Re: Snippets management

2008-11-06 Thread expora
On Nov 6, 12:38 pm, Stef Mientki <[EMAIL PROTECTED]> wrote: > Edwin wrote: > > Hi there, > > > I've been looking for a snippet manager and found PySnippet but it > > requires PyGTK. Do you know any other option that doesn't need much? > > > I'm sort of new to python and user interfaces seem a bit f

Re: CGI Python problem

2008-11-06 Thread Tim Chase
As for writing some perl, not too sure how to do that, but from the information in phpinfo I logged onto the webserver machine and did a "whereis python" - it came back blank! Of course doing a whereis perl gave a non-blank answer. So this seems to be the route cause of my trouble. Indeed! I ma

Re: etymology of "list comprehension"?

2008-11-06 Thread Paul Rubin
[EMAIL PROTECTED] writes: > Ah, thanks... and does "comprehension" have any special computer > science meaning? It is from mathematical set theory. If you write something like { p | [some logical expression indicating that p is prime] } then that denotes a set (the set of all prime numbers).

Re: CGI Python problem

2008-11-06 Thread Tim O'Toole
Alas that cgi script confirmed python is not installed on the server machine (which I had assumed it was). Looks like game over with this avenue of trouble shooting? On Fri, Nov 7, 2008 at 1:03 AM, Tim Chase <[EMAIL PROTECTED]> wrote: >> As for writing some perl, not too sure how to do that, but

Re: False and 0 in the same dictionary

2008-11-06 Thread John Machin
On Nov 7, 11:54 am, Paul Rubin wrote: > Prateek <[EMAIL PROTECTED]> writes: > > > How about using (x, type(x)) as the key instead of just x? > > Yup. I thought of that. Although it seems kinda unpythonic to do so. > > Especially since the dictionary is basically a cache m

Re: CGI Python problem

2008-11-06 Thread Tim Chase
Tim O'Toole wrote: Alas that cgi script confirmed python is not installed on the server machine (which I had assumed it was). Did you also try it with the "find" variant in addition to just the "which" version? This would find Python if it wasn't on the $PATH. Looks like game over with th

Re: Finding the instance reference of an object

2008-11-06 Thread Aaron Brady
On Nov 6, 6:00 pm, Terry Reedy <[EMAIL PROTECTED]> wrote: > Aaron Brady wrote: > > and you can't have languages without implementations. > > This is either a claim that languages are their own implementations, or > an admission that human brains are the implementation of all languages > thought of

Re: I need a simple windows form handle.

2008-11-06 Thread 一首诗
On Nov 7, 4:55 am, Aaron Brady <[EMAIL PROTECTED]> wrote: > On Nov 6, 7:50 am, 一首诗 <[EMAIL PROTECTED]> wrote: > > > > > Hi all, > > > Today I was writing a simple test app for a video decoder library. > > > I use python to parse video files and input data to the library. > > > I got a problem here,

Re: 2.6, 3.0, and truly independent intepreters

2008-11-06 Thread sturlamolden
On Nov 7, 12:22 am, Walter Overby <[EMAIL PROTECTED]> wrote: > I read Andy to stipulate that the pipe needs to transmit "hundreds of > megs of data and/or thousands of data structure instances."  I doubt > he'd be happy with memcpy either.  My instinct is that contention for > a lock could be the

Re: Can read() be non-blocking?

2008-11-06 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Thomas Christensen wrote: > r = select.select([proc.stdout.fileno()], [], [], 5)[0] > if r: > # NOTE: This will block since it reads until EOF > data = proc.stdout.read() No, it will read what data is available. -- http://mail.python

efficient Python object count

2008-11-06 Thread darrenr
Hello, Does anyone know of an efficient way to get a count of the total number of Python objects in CPython? The best solution I've been able to find is len(gc.get_objects()) which unfortunately has to walk a C linked list *and* creates a list containing all of the objects, when all I need is an o

Re: etymology of "list comprehension"?

2008-11-06 Thread James Harris
On 6 Nov, 22:13, [EMAIL PROTECTED] wrote: > Chris Rebert <[EMAIL PROTECTED]> wrote: > > the term > > "comprehension" for the concept was first used in the NPL programming > > language (Wikipedia again). > > Ah, thanks... and does "comprehension" have any special computer > science meaning? Good qu

Re: Can read() be non-blocking?

2008-11-06 Thread James Mills
On Fri, Nov 7, 2008 at 8:54 AM, Thomas Christensen <[EMAIL PROTECTED]> wrote: > Is there a way to read non-blocking? Or maybe event a better way in > generel to handle this situation? Check out circuits [1]. It has a Component called Stdin [2] which allows you to have non-blocking Standard Input

Re: How to build the pysqlite? Where to find the "sqlite3.h"?

2008-11-06 Thread Kurda Yon
> > > But I read your statement and understood that I do not need to install > > neither "pysqlite" no "sqlite". In my Python session I tried to type > > "from sqlite import connect" and it does not compaline. It meand that > > Python see the database!!! I hope. > > I don't think so. There is no "s

Re: efficient Python object count

2008-11-06 Thread Christian Heimes
darrenr wrote: Hello, Does anyone know of an efficient way to get a count of the total number of Python objects in CPython? The best solution I've been able to find is len(gc.get_objects()) which unfortunately has to walk a C linked list *and* creates a list containing all of the objects, when a

Re: I need a simple windows form handle.

2008-11-06 Thread Aaron Brady
On Nov 6, 7:58 pm, 一首诗 <[EMAIL PROTECTED]> wrote: > On Nov 7, 4:55 am, Aaron Brady <[EMAIL PROTECTED]> wrote: > > > > > On Nov 6, 7:50 am, 一首诗 <[EMAIL PROTECTED]> wrote: > > > > Hi all, > > > > Today I was writing a simple test app for a video decoder library. > > > > I use python to parse video fi

Re: Finding the instance reference of an object

2008-11-06 Thread Steven D'Aprano
On Thu, 06 Nov 2008 09:59:37 -0700, Joe Strout wrote: > that's > pretty much the whole point: that variables in Python don't contain > objects, but merely contain references to objects that are actually > stored somewhere else (i.e. on the heap). You're wrong, Python variables don't contain *anyt

RELEASED Python 3.0rc2

2008-11-06 Thread Barry Warsaw
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On behalf of the Python development team and the Python community, I am happy to announce the second release candidate for Python 3.0. This is a release candidate, so while it is not suitable for production environments, we strongly encourage yo

Re: I need a simple windows form handle.

2008-11-06 Thread sturlamolden
On Nov 7, 2:58 am, 一首诗 <[EMAIL PROTECTED]> wrote: > Hi, that's because I guess wxpython does not use native windows forms > and could not provide > a "handle" property. Huh? > I will make more study. Take a look at wxFormBuilder. I have a wxPython tutorial in my blog. http://sturlamolden.blog

Re: Accessing POST parameters from BaseHTTPServer

2008-11-06 Thread Steve Holden
James wrote: > Hi all, > I'm writing a super simple little debugging HTTP server which simply > returns the path and parameters it receives requests for. > > E.g. requesting /meth?a=b returns something like: > Command: GET > Path: /meth > Params: {'a': ['b']} > > This is fine for GET, but I can't

Re: False and 0 in the same dictionary

2008-11-06 Thread Paul Rubin
John Machin <[EMAIL PROTECTED]> writes: > > You could use a second dict for the other type: > > > >   def lookup(x): > >     if x in dict1: return dict1[x] > >     return dict2[x] > > > > dict1 would have the 4 special keys and dict2 would have the regular > > keys. > > > Ummm how do you get "the

Re: convert to XMLRPC

2008-11-06 Thread 一首诗
On Nov 7, 8:22 am, Michel Perez <[EMAIL PROTECTED]> wrote: > Que vola a todos: >  I have an object abstraction layer that allows me to comunicate and > interact with my DB server without much problems -am thinking in > possibles contributors. > >  In the stdlib xmlrpclib handles this in a common wa

Re: Can read() be non-blocking?

2008-11-06 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Lawrence D'Oliveiro wrote: > In message <[EMAIL PROTECTED]>, Thomas > Christensen wrote: > >> r = select.select([proc.stdout.fileno()], [], [], 5)[0] >> if r: >> # NOTE: This will block since it reads until EOF >> data = proc.stdout.

Re: Can read() be non-blocking?

2008-11-06 Thread 一首诗
On Nov 7, 6:54 am, Thomas Christensen <[EMAIL PROTECTED]> wrote: > This issue has been raised a couple of times I am sure.  But I have yet > to find a satisfying answer. > > I am reading from a subprocess and this subprocess sometimes hang, in > which case a call to read() call will block indefinit

Re: Finding the instance reference of an object

2008-11-06 Thread Joe Strout
First, I want to thank everyone for your patience -- I think we're making progress towards a consensus. On Nov 6, 2008, at 8:48 PM, Steven D'Aprano wrote: that's pretty much the whole point: that variables in Python don't contain objects, but merely contain references to objects that are actu

Re: Can read() be non-blocking?

2008-11-06 Thread Karthik Gurusamy
On Nov 6, 2:54 pm, Thomas Christensen <[EMAIL PROTECTED]> wrote: > This issue has been raised a couple of times I am sure.  But I have yet > to find a satisfying answer. > > I am reading from a subprocess and this subprocess sometimes hang, in > which case a call to read() call will block indefinit

Re: efficient Python object count

2008-11-06 Thread darrenr
On Nov 6, 7:28 pm, Christian Heimes <[EMAIL PROTECTED]> wrote: > darrenr wrote: > > Hello, > > > Does anyone know of an efficient way to get a count of the total > > number of Python objects in CPython? The best solution I've been able > > to find is len(gc.get_objects()) which unfortunately has to

Re: Can read() be non-blocking?

2008-11-06 Thread [EMAIL PROTECTED]
On Nov 7, 9:09 am, Lawrence D'Oliveiro <[EMAIL PROTECTED] central.gen.new_zealand> wrote: > In message <[EMAIL PROTECTED]>, Lawrence D'Oliveiro wrote: > > > In message <[EMAIL PROTECTED]>, Thomas > > Christensen wrote: > > >>       r = select.select([proc.stdout.fileno()], [], [], 5)[0] > >>      

Re: Finding the instance reference of an object [long and probably boring]

2008-11-06 Thread Steve Holden
Joe Strout wrote: > On Nov 6, 2008, at 12:44 PM, Arnaud Delobelle wrote: > >> I know this thread has grown quite personal for some of its >> participants. I am posting in a spirit of peace and understanding :) > > Thanks, I'll do the same. > That's good to hear. Your arguments are sometimes pre

Re: Finding the instance reference of an object

2008-11-06 Thread Terry Reedy
Aaron Brady wrote: On Nov 6, 6:00 pm, Terry Reedy <[EMAIL PROTECTED]> wrote: 'Associating' is a primitive operation for Python interpreters. Interesting. If I may be so bold as to ask, is it for C code, C compilers, and/or C programs? Sorry, I should have specified for the abstract defini

Re: PySqlite - division of real numbers without decimal fractions

2008-11-06 Thread Dan Bishop
On Nov 6, 3:46 pm, Astley Le Jasper <[EMAIL PROTECTED]> wrote: > I've been getting errors recently when using pysqlite. I've declared > the table columns as real numbers to 2 decimal places (I'm dealing > with money), but when doing division on two numbers that happen to > have no decimal fractions

Re: Finding the instance reference of an object

2008-11-06 Thread Steve Holden
Steven D'Aprano wrote: > On Thu, 06 Nov 2008 09:59:37 -0700, Joe Strout wrote: [...] > And by definition, "call by value" means that the parameter is a copy. So > if you pass a ten megabyte data structure to a function using call-by- > value semantics, the entire ten megabyte structure is copied.

Re: etymology of "list comprehension"?

2008-11-06 Thread Terry Reedy
Paul Rubin wrote: [EMAIL PROTECTED] writes: Ah, thanks... and does "comprehension" have any special computer science meaning? It is from mathematical set theory. If you write something like { p | [some logical expression indicating that p is prime] } then that denotes a set (the set of a

Re: Finding the instance reference of an object

2008-11-06 Thread Steve Holden
Joe Strout wrote: > First, I want to thank everyone for your patience -- I think we're > making progress towards a consensus. > Phew. > >> But putting that aside, consider the Python >> code "x = 1". Which statement would you agree with? >> >> (A) The value of x is 1. > > Only speaking loosely (

Re: Finding the instance reference of an object [long and probably boring]

2008-11-06 Thread Ben Finney
Steve Holden <[EMAIL PROTECTED]> writes: > One of the reasons for Python's continue march towards world > domination (allow me my fantasies) is its consistent simplicity. > Those last two words would be my candidate for the definition of > "Pythonicity". +1 QOTW -- \ Eccles: “I'll get

Re: False and 0 in the same dictionary

2008-11-06 Thread John Machin
On Nov 7, 3:05 pm, Paul Rubin wrote: > John Machin <[EMAIL PROTECTED]> writes: > > > You could use a second dict for the other type: > > > > def lookup(x): > > > if x in dict1: return dict1[x] > > > return dict2[x] > > > > dict1 would have the 4 special keys and dict2 wou

Re: Python25\Tools\checkversions.py

2008-11-06 Thread Martin v. Löwis
> I suggest that consideration be given to dropping it and and > versionchecker from the distribution. I see that it still appears in > versions 2.6 and 3.0. Please submit a bug report to bugs.python.org to this effect. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: etymology of "list comprehension"?

2008-11-06 Thread Martin v. Löwis
[EMAIL PROTECTED] wrote: > Chris Rebert <[EMAIL PROTECTED]> wrote: >> the term >> "comprehension" for the concept was first used in the NPL programming >> language (Wikipedia again). > > Ah, thanks... and does "comprehension" have any special computer > science meaning? Paul already explained the

creating a block file for file-like object

2008-11-06 Thread Iain
Hi, I have a function that only accepts filenames, rather than file-like objects (because its a wrapper around a C++ function, I think). I want to feed some potentially large "files" into this function, but they are coming in as streams (eg from a url) and so are only represented in my code as fi

Re: creating a block file for file-like object

2008-11-06 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Iain wrote: > Can someone give me some pointers as to how I might create some sort > of blocking device file or named pipe ... mkfifo /path/to/named/pipe -- http://mail.python.org/mailman/listinfo/python-list

Re: convert to XMLRPC

2008-11-06 Thread Stefan Behnel
Michel Perez wrote: > [db connection] > In the stdlib xmlrpclib handles this in a common way, but i use a > customized GatewayHandler that give me the posibility to serialize my > objects and send them to my clients Doesn't XML-RPC do that for you already? What's the protocol you use for client co

Re: need money for comp. shit?

2008-11-06 Thread Stefan Behnel
bslobodi wrote: > [spam stripped] Sorry, I didn't find comp.shit on Gmane. Did you mean comp.shell or something in that line? Stefan -- http://mail.python.org/mailman/listinfo/python-list

problem with regex, how to conclude more than one character

2008-11-06 Thread tecspring
I always have no idea about how to express "conclude the entire word" with regexp, while using python, I encountered this problem again... for example, if I want to match the "string" in "test a string", re.findall(r"[^a]* (\w+)","test a string") will work, but what if there is not "a" but "an"(t

Re: problem with regex, how to conclude more than one character

2008-11-06 Thread tecspring
On Nov 7, 3:06 pm, [EMAIL PROTECTED] wrote: > I always have no idea about how to express "conclude the entire word" > with regexp,  while using python, I encountered this problem again... > > for example, if I want to match the "string" in "test a string", > re.findall(r"[^a]* (\w+)","test a string

Re: problem with regex, how to conclude more than one character

2008-11-06 Thread Chris Rebert
On Thu, Nov 6, 2008 at 11:06 PM, <[EMAIL PROTECTED]> wrote: > I always have no idea about how to express "conclude the entire word" > with regexp, while using python, I encountered this problem again... > > for example, if I want to match the "string" in "test a string", > re.findall(r"[^a]* (\w+

Re: problem with regex, how to conclude more than one character

2008-11-06 Thread Charles Yan
Really thanks for quickly reply Chris! Actually I tried BeautifulSoup and it's great. But I'm not very familiar with it and it need more codes to parse the html and get the right text. I think regexp is more convenient if there is a way to filter out the list just in one line:) I did this all the w

<    1   2