RELEASED Python 2.5 (release candidate 2)

2006-09-13 Thread Anthony Baxter
On behalf of the Python development team and the Python community, I'm happy to announce the second RELEASE CANDIDATE of Python 2.5. After the first release candidate a number of new bugfixes have been applied to the Python 2.5 code. In the interests of making 2.5 the best release possible, we've

How can I get the function's caller?

2006-09-13 Thread David
Inside a function I need to get the function's caller's name. How can I get it? thanks in advance. David -- http://mail.python.org/mailman/listinfo/python-list

How to compare to directories?

2006-09-13 Thread could . net
I want to compare 2 directories: dir1 and dir2. What I want to do is to get these informations: 1. does they have the same number of files and sub-directories? 2. does each file with the same name have the same size and date information? So, how can I do it in python? Thank you! --

Re: Help me use my Dual Core CPU!

2006-09-13 Thread Simon Wittber
Michael wrote: Also, Paul Boddie posted a module for parallel systems a while back as well which might be useful (at least for ideas): * http://cheeseshop.python.org/pypi/parallel I've checked this out, it looks like a good idea which I could build further on. I've just noticed that

Re: How can I get the function's caller?

2006-09-13 Thread Steve Holden
David wrote: Inside a function I need to get the function's caller's name. How can I get it? thanks in advance. The function caller, like most objects in Python, needn't actually have a name. It could, for example, be a lambda stored as a list element. What do you need this name for,

Re: elementtree: line numbers and iterparse

2006-09-13 Thread Stuart McGraw
Fredrik Lundh [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Stuart McGraw wrote: Now I find i need to get and save the input file line number of each node. Googling turned up a way to do it by subclassing FancyTreeBuilder,

Re: Validation of email

2006-09-13 Thread Tim Roberts
Norman Khine [EMAIL PROTECTED] wrote: What is the best way to generate a long authentication string and email this so that the user can reply and verify that the email address they have provided is authentic, similar I guess to the way Bugzilla works? Should this be server side or client? How

Re: Help me use my Dual Core CPU!

2006-09-13 Thread Paul Rubin
Simon Wittber [EMAIL PROTECTED] writes: I've just noticed that os.fork is not available on Win32. Ouch. Use the subprocess module. -- http://mail.python.org/mailman/listinfo/python-list

Re: Are Python's reserved words reserved in places they dont need to be?

2006-09-13 Thread Antoon Pardon
On 2006-09-13, Carl Banks [EMAIL PROTECTED] wrote: metaperl wrote: -- python -i class = algebra File stdin, line 1 class = algebra ^ SyntaxError: invalid syntax Why isn' t the parser smart enough to see that class followed by an identifier is used for class

RE: Are Python's reserved words reserved in places they dont need tobe?

2006-09-13 Thread Delaney, Timothy (Tim)
Antoon Pardon wrote: This is just an idea of mine, nothing I expect python to adapt. But just suppose the language allowed for words in bold. A word in bold would be considered a reserved word, a word in non bold would be an identifier. Exactly how am I supposed to use my text editor to make

Re: How to compare to directories?

2006-09-13 Thread Marc 'BlackJack' Rintsch
In [EMAIL PROTECTED], could.net wrote: I want to compare 2 directories: dir1 and dir2. What I want to do is to get these informations: 1. does they have the same number of files and sub-directories? 2. does each file with the same name have the same size and date information? I think

Re: How to compare to directories?

2006-09-13 Thread Rob Wolfe
[EMAIL PROTECTED] wrote: I want to compare 2 directories: dir1 and dir2. What I want to do is to get these informations: 1. does they have the same number of files and sub-directories? 2. does each file with the same name have the same size and date information? So, how can I do it in

Python blogging software

2006-09-13 Thread Cliff Wells
There's been a lot of blogs started in Python, but given the recent spate of web frameworks, I'm surprised that some blogging package hasn't taken front seat yet. I'm currently using Frog, and it's decent, but lacks some fundamental features (tags for one). Since Irmen is probably going to scrap

Re: Help me use my Dual Core CPU!

2006-09-13 Thread Simon Wittber
Paul Rubin wrote: Simon Wittber [EMAIL PROTECTED] writes: I've just noticed that os.fork is not available on Win32. Ouch. Use the subprocess module. I can't see how subprocess.Popen can replace a fork. Using a manually started process is not really viable, as it does not automatically share

Re: Are Python's reserved words reserved in places they dont need to be?

2006-09-13 Thread Paul Rubin
Antoon Pardon [EMAIL PROTECTED] writes: This is just an idea of mine, nothing I expect python to adapt. But just suppose the language allowed for words in bold. A word in bold would be considered a reserved word, a word in non bold would be an identifier. Heh, sounds like ColorForth, in

Re: Python blogging software

2006-09-13 Thread Cliff Wells
On Wed, 2006-09-13 at 00:29 -0700, Cliff Wells wrote: Anyone aware of any functional (doesn't need to be complete, beta is fine) blog software written in Python? Hmph. And as soon as I hit send I find http://wiki.python.org/moin/PythonBlogSoftware Okay, so is there any *not* on that list

Re: How can I get the function's caller?

2006-09-13 Thread John Machin
David wrote: Inside a function I need to get the function's caller's name. How can I get it? Check out the thread __LINE__ and __FILE__ functionality in Python? (messages posted 2006-0813). -- http://mail.python.org/mailman/listinfo/python-list

Re: How to get the longest possible match with Python's RE module?

2006-09-13 Thread gatti
Frederic Rentsch wrote: If you need regexes, why not just reverse-sort your expressions? This seems a lot easier and faster than writing another regex compiler. Reverse-sorting places the longer ones ahead of the shorter ones. Unfortunately, not all regular expressions have a fixed match

Re: Help me use my Dual Core CPU!

2006-09-13 Thread Paul Rubin
Simon Wittber [EMAIL PROTECTED] writes: I can't see how subprocess.Popen can replace a fork. Using a manually started process is not really viable, as it does not automatically share pre-built (read-only) data between the processes. If it can, I'd really like to know how... Either with

Re: Are Python's reserved words reserved in places they dont need tobe?

2006-09-13 Thread Antoon Pardon
On 2006-09-13, Delaney, Timothy (Tim) [EMAIL PROTECTED] wrote: Antoon Pardon wrote: This is just an idea of mine, nothing I expect python to adapt. But just suppose the language allowed for words in bold. A word in bold would be considered a reserved word, a word in non bold would be an

Re: How to compare to directories?

2006-09-13 Thread Gabriel Genellina
At Wednesday 13/9/2006 03:09, [EMAIL PROTECTED] wrote: I want to compare 2 directories: dir1 and dir2. What I want to do is to get these informations: 1. does they have the same number of files and sub-directories? 2. does each file with the same name have the same size and date information?

RE: Are Python's reserved words reserved in places they dont need tobe?

2006-09-13 Thread Duncan Booth
Delaney, Timothy (Tim) [EMAIL PROTECTED] wrote: Antoon Pardon wrote: This is just an idea of mine, nothing I expect python to adapt. But just suppose the language allowed for words in bold. A word in bold would be considered a reserved word, a word in non bold would be an identifier.

Re: Are Python's reserved words reserved in places they dont need to be?

2006-09-13 Thread Antoon Pardon
On 2006-09-13, Paul Rubin http wrote: Antoon Pardon [EMAIL PROTECTED] writes: This is just an idea of mine, nothing I expect python to adapt. But just suppose the language allowed for words in bold. A word in bold would be considered a reserved word, a word in non bold would be an identifier.

Extra Unittest Information

2006-09-13 Thread Calvin Spealman
This is something I have been wanting to find for a while, but i haven't figured out. I really would love to know if there is some way I can report extra information while running unittests, and have that information appear along with the tracebacks, so its near the relevent test's results. --

Re: Are Python's reserved words reserved in places they dont need to be?

2006-09-13 Thread Fredrik Lundh
Antoon Pardon wrote: One place where I would use such a feature is in a unittest package. I think being able to write self.assert or self.raise looks better than having to append an underscore. patch here: http://mail.python.org/pipermail/python-list/2001-June/047996.html /F --

Re: Are Python's reserved words reserved in places they dont need tobe?

2006-09-13 Thread Steve Holden
Delaney, Timothy (Tim) wrote: Antoon Pardon wrote: This is just an idea of mine, nothing I expect python to adapt. But just suppose the language allowed for words in bold. A word in bold would be considered a reserved word, a word in non bold would be an identifier. Exactly how am I

Re: Inter process signalling

2006-09-13 Thread Dale Strickland-Clark
Dennis Lee Bieber wrote: Unfortunately... You are on Windows... I think your choices become: Block, or Poll Check the Win32Api modules... win32event may be a candidate... CreateEvent() OpenEvent() PulseEvent() SetEvent() ResetEvent() WaitForSingleObject() or

How to write UNIX daemons in Python?

2006-09-13 Thread gnewsg
Hi all. I've just finished to write an FTP daemon in Python. To do things well I'd like to write an 'insteller' to permit the end user to 'deeply' install the package inside the system. In details I would like that installer is able to do the following operations: - copy ftpd.py in /usr/bin. -

Re: Help me use my Dual Core CPU!

2006-09-13 Thread Paul Boddie
Simon Wittber wrote: Michael wrote: Also, Paul Boddie posted a module for parallel systems a while back as well which might be useful (at least for ideas): * http://cheeseshop.python.org/pypi/parallel I've checked this out, it looks like a good idea which I could build further on.

Re: Is it just me, or is Sqlite3 goofy?

2006-09-13 Thread Hendrik van Rooyen
Tim Chase [EMAIL PROTECTED] wrote: To: Steve Holden [EMAIL PROTECTED] But honestly, boss, I didn't write this code! It was my evil alter-ego that puts VARCHAR values containing Gilbert Sullivan lyrics into the Amount_Due CURRENCY fields! Hence the phrase Going for a song? I am

Re: Is it just me, or is Sqlite3 goofy?

2006-09-13 Thread Hendrik van Rooyen
From: Steve Holden [EMAIL PROTECTED] wrote: snip These kids wi' their Oracle databases didn't know they were born. I can remember 'avin' to optimise programs by making sure that the next instruction were comin' under the heads of t' drum just as the last instruction were finishing. But yer

Re: table (ascii text) lin ayout recognition

2006-09-13 Thread James Stroud
[EMAIL PROTECTED] wrote: Hello, I am looking for python code useful to process tables that are in ASCII text. The code must determine where are the columns (fields). Concerned tables for my application are various, but their columns are not very complicated to locate for a human, because

Re: Inter process signalling

2006-09-13 Thread Duncan Booth
Dale Strickland-Clark [EMAIL PROTECTED] wrote: In Linux this is easy with 'signal' and 'kill' but how can I get one Python process to signal another (possibly running as a service)? All I need is a simple prod with no other data being sent and none being returned - except that the signal

Re: table (ascii text) lin ayout recognition

2006-09-13 Thread James Stroud
James Stroud wrote: indices = [t for t in zip(indices[::2],indices[1::2])] (Artefact of cut-and-paste.) Make that: indices = zip(indices[::2],indices[1::2]) James -- http://mail.python.org/mailman/listinfo/python-list

Re: Inter process signalling

2006-09-13 Thread Dale Strickland-Clark
Duncan Booth wrote: Dale Strickland-Clark [EMAIL PROTECTED] wrote: In Linux this is easy with 'signal' and 'kill' but how can I get one Python process to signal another (possibly running as a service)? All I need is a simple prod with no other data being sent and none being returned -

os.access(file, os.R_OK) on UNIX and WINDOWS

2006-09-13 Thread kai rosenthal
Hello, on UNIX I changed the permission of a file myfile with chmod 000 myfile. Then I got 0 from os.access(myfile, os.R_OK). This is ok. Then I checked the same file on WINDOWS (with samba): I got True from os.access(myfile, os.R_OK). I think it is not ok?! In my python script I check the

Re: egg and modpython

2006-09-13 Thread Paul Boddie
Bruno Desthuilliers wrote: AFAIK, jar files don't include native dynamic libs... But I'm not a Java expert (happily forgot most of what I used to know about this language). I can't be bothered to read the specification to say what is allowed in .jar files, but .war files frequently get

Re: Help me use my Dual Core CPU!

2006-09-13 Thread Robin Becker
Simon Wittber wrote: Paul Rubin wrote: Simon Wittber [EMAIL PROTECTED] writes: I've just noticed that os.fork is not available on Win32. Ouch. Use the subprocess module. I can't see how subprocess.Popen can replace a fork. Using a manually started process is not really viable, as it does

Re: Newbie - ? get IDLE going on cygwin

2006-09-13 Thread David J. Braden
Thorsten Kampe wrote: * David J. Braden (2006-09-12 18:35 +0100) I can run Python in command-line mode fine from the cygwin shell; the cygwin distribution also includes IDLE, which is apparently completely installed, yet I am unable to get IDLE running. When I double-click idle.bat (or

Re: Help me use my Dual Core CPU!

2006-09-13 Thread Paul Rubin
Robin Becker [EMAIL PROTECTED] writes: Nobody seems to have mentioned POSH http://poshmodule.sourceforge.net which used almost to work. I assume it's busted for later pythons and the author says it's just a demonstration. Yeah, it's been mentioned. Anandtech demoed an 8 core mac pro machine

Re: Is it just me, or is Sqlite3 goofy?

2006-09-13 Thread Magnus Lycka
First of all, anyone with extensive experience in database systems understand that validating and cleaning input is an unavoidable task. Static typing can help identify some of the problems, but far from all, and there is often data processing done before the data enters the database, so it's

Re: How to write UNIX daemons in Python?

2006-09-13 Thread Diez B. Roggisch
[EMAIL PROTECTED] wrote: Hi all. I've just finished to write an FTP daemon in Python. To do things well I'd like to write an 'insteller' to permit the end user to 'deeply' install the package inside the system. In details I would like that installer is able to do the following operations:

Re: os.name under Win32

2006-09-13 Thread Igor Kravtchenko
Hi again, I get back to this old thread. sys.platform returns indeed win32 under Windows. os.name should return posix even under Windows if we are under Cygwin as Martin suggested. Recently, someone advised me to use instead: platform.system() that returns only 3 different strings: Java,

Re: Are Python's reserved words reserved in places they dont need tobe?

2006-09-13 Thread Diez B. Roggisch
Exactly how am I supposed to use my text editor to make words bold? Is every text editor supposed to understand a python format for code? The standard answer here to people complaining about their editor not working well with python is that they should use a better editor. In general, that

Re: best small database?

2006-09-13 Thread Pierre Quentel
Buzhug (like Karrigell and Strakell) is a Breton word ; Breton is the language spoken in Brittany, the westernmost part of France. Less and less spoken, actually, but I do, like all my ancestors. It is a close cousin of Welsh, and has common roots with Irish and Gaelic Buzhug means earthworm, the

RE: pyLinda?

2006-09-13 Thread Tim Golden
(Caveat Lector: I've dabbled with this, but a while ago) [Gardner Pomper] | It sounds like pyLinda runs a server process and stores | tuples in it. That's about. From the Beginner's Guide page: http://www-users.cs.york.ac.uk/aw/pylinda/beginner.html First a server must be started -

Re: Are Python's reserved words reserved in places they dont need tobe?

2006-09-13 Thread Antoon Pardon
On 2006-09-13, Diez B. Roggisch [EMAIL PROTECTED] wrote: Exactly how am I supposed to use my text editor to make words bold? Is every text editor supposed to understand a python format for code? The standard answer here to people complaining about their editor not working well with python is

Re: Help me use my Dual Core CPU!

2006-09-13 Thread Robin Becker
Paul Rubin wrote: Robin Becker [EMAIL PROTECTED] writes: Nobody seems to have mentioned POSH http://poshmodule.sourceforge.net which used almost to work. I assume it's busted for later pythons and the author says it's just a demonstration. Yeah, it's been mentioned. Anandtech demoed an 8

Re: Help me use my Dual Core CPU!

2006-09-13 Thread Simon Wittber
Paul Boddie wrote: Simon Wittber wrote: Michael wrote: Also, Paul Boddie posted a module for parallel systems a while back as well which might be useful (at least for ideas): * http://cheeseshop.python.org/pypi/parallel I've just noticed that os.fork is not available on

Re: Is it just me, or is Sqlite3 goofy?

2006-09-13 Thread Magnus Lycka
[EMAIL PROTECTED] wrote: What was Richard Hipp's justification for slandering the writers of the SQL Language Specification? First of all, if you read the text you quoted and understand English, you should be able to see that the author of the text is clearly expressing an opinion, not stating

Re: Are Python's reserved words reserved in places they dont need tobe?

2006-09-13 Thread Diez B. Roggisch
In general, that is true for the 21st century. But under certain circumstances, one might be forced to use a vi over a limited b/w terminal to fix that goddamn bug on the live system. AFAIR, even those terminals had a form of highlighting. And personnaly I would think PEP 0263 would be

Re: Help me use my Dual Core CPU!

2006-09-13 Thread Paul Rubin
Robin Becker [EMAIL PROTECTED] writes: No I think they tried to just run a lot of processes at once and they got the 8 core by just substituting the two dual cores with two quads. Huh?! There are no quad core x86 cpu's as far as I know ;). I used occam back in the eighties with ibm pcs and

Re: python reference counting and exceptions

2006-09-13 Thread Andreas Huesgen
Delaney, Timothy (Tim) wrote: RIIA - Resource Initialisation is Acquisition Python is adding an RIIA mechanism in 2.5 - look at the with statement. Ah, thanks, thats exactly what I was looking for. Gabriel Genellina wrote: Yes: the try/finally construct, which is *not* the same as a

Re: Is it just me, or is Sqlite3 goofy?

2006-09-13 Thread Magnus Lycka
Paul Boddie wrote: To be fair, that text originates in section 12.3, referring to input parameters to procedures. Meanwhile, the following text (subclause 13.8, insert statement) appears to be more pertinent: If the data type of the target identified by the i-th column name is an exact

Re: Help me use my Dual Core CPU!

2006-09-13 Thread Paul Boddie
Simon Wittber wrote: Paul Boddie wrote: Rumour has it that recent versions of Windows provide fork-like semantics through a system call. Your mission is to integrate this transparently into the standard library's os.fork function. ;-) I'm not sure I'm up to this kind of low level stuff,

RELEASED Python 2.5 (release candidate 2)

2006-09-13 Thread Anthony Baxter
On behalf of the Python development team and the Python community, I'm happy to announce the second RELEASE CANDIDATE of Python 2.5. After the first release candidate a number of new bugfixes have been applied to the Python 2.5 code. In the interests of making 2.5 the best release possible, we've

Re: Newbie - ? get IDLE going on cygwin

2006-09-13 Thread Jason Tishler
Dave, On Wed, Sep 13, 2006 at 09:42:48AM +, David J. Braden wrote: Thorsten Kampe wrote: * David J. Braden (2006-09-12 18:35 +0100) I can run Python in command-line mode fine from the cygwin shell; the cygwin distribution also includes IDLE, which is apparently completely installed,

Re: auto upgrade scripts?

2006-09-13 Thread Larry Bates
[EMAIL PROTECTED] wrote: Auto-upgrade from what to what? -Larry Bates Interesting question. In my case I want my program to check for (e.g.) bug-fix releases on some location (network drive or ftp), and if available, allow to automatically download and install them. Kind of like the

Re: Is it just me, or is Sqlite3 goofy?

2006-09-13 Thread Paul Boddie
Magnus Lycka wrote: Paul Boddie wrote: To be fair, that text originates in section 12.3, referring to input parameters to procedures. Meanwhile, the following text (subclause 13.8, insert statement) appears to be more pertinent: If the data type of the target identified by the i-th

Re: table (ascii text) lin ayout recognition

2006-09-13 Thread bearophileHUGS
My version, not much tested. It probably doesn't work well for tables with few rows. It finds the most frequent word beginnings, and then splits the data according to them. data = \ 44544 ipod apple black 102 GFGFHHF-12 unknown thing bizar brick mortar tbc 45fjk

Re: Are Python's reserved words reserved in places they dont need tobe?

2006-09-13 Thread Antoon Pardon
On 2006-09-13, Diez B. Roggisch [EMAIL PROTECTED] wrote: In general, that is true for the 21st century. But under certain circumstances, one might be forced to use a vi over a limited b/w terminal to fix that goddamn bug on the live system. AFAIR, even those terminals had a form of

Re: Extra Unittest Information

2006-09-13 Thread Robert Kern
Calvin Spealman wrote: This is something I have been wanting to find for a while, but i haven't figured out. I really would love to know if there is some way I can report extra information while running unittests, and have that information appear along with the tracebacks, so its near the

Re: Gadfly server startup error

2006-09-13 Thread Ralf Muschall
Steve Holden wrote: You're already doing better than I am. On Cygwin 2.5rc2 and Windows 2.4.2 I can't even get it to runs its tests properly: I don't remember whether I looked into that at all. ... NameError: global name 'Server' is not defined ... Time to report a bug, methinks? Makes

socket question

2006-09-13 Thread hg
Hi, I am not sure whether this is a python-related question. If I have device A than sends XX bytes to device B, and device B does a recv(XX) using the default timeout, what could make device B wake-up with less than XX bytes received ? Regards, hg --

Re: Scientific computing and data visualization.

2006-09-13 Thread Paul F. Kunz
Fie Pye [EMAIL PROTECTED] writes: Hallo I would like to have a high class open source tools for scientific computing and powerful 2D and 3D data visualisation. Therefore I chose python, numpy and scipy as a base. Now I am in search for a visualisation tool. I tried

RE: os.access(file, os.R_OK) on UNIX and WINDOWS

2006-09-13 Thread Tim Golden
[kai rosenthal] | on UNIX I changed the permission of a file myfile with chmod 000 | myfile. Then I got 0 from os.access(myfile, os.R_OK). This is ok. | | Then I checked the same file on WINDOWS (with samba): | I got True from os.access(myfile, os.R_OK). I think it is not ok?! Ummm. This is a

Re: socket question

2006-09-13 Thread Diez B. Roggisch
hg wrote: Hi, I am not sure whether this is a python-related question. If I have device A than sends XX bytes to device B, and device B does a recv(XX) using the default timeout, what could make device B wake-up with less than XX bytes received ? There exist higher abstractions for

Re: socket question

2006-09-13 Thread Jean-Paul Calderone
On Wed, 13 Sep 2006 08:13:43 -0500, hg [EMAIL PROTECTED] wrote: Hi, I am not sure whether this is a python-related question. If I have device A than sends XX bytes to device B, and device B does a recv(XX) using the default timeout, what could make device B wake-up with less than XX bytes

Re: Random Drawing Simulation -- performance issue

2006-09-13 Thread Brendon Towle
On 12 Sep 2006, at 6:33 PM, [EMAIL PROTECTED] wrote: Date: 12 Sep 2006 15:23:51 -0700 From: Simon Forman [EMAIL PROTECTED] Subject: Re: Random Drawing Simulation -- performance issue Brendon Towle wrote: I need to simulate scenarios like the following: You have a deck of 3 orange cards, 5

Re: Help me use my Dual Core CPU!

2006-09-13 Thread Robin Becker
Paul Rubin wrote: Robin Becker [EMAIL PROTECTED] writes: No I think they tried to just run a lot of processes at once and they got the 8 core by just substituting the two dual cores with two quads. Huh?! There are no quad core x86 cpu's as far as I know ;). well these guys seem to think

Re: Random Drawing Simulation -- performance issue

2006-09-13 Thread Brendon Towle
On 13 Sep 2006, at 1:01 AM, [EMAIL PROTECTED] wrote: Date: 12 Sep 2006 20:17:47 -0700 From: Paul Rubin http://[EMAIL PROTECTED] Subject: Re: Random Drawing Simulation -- performance issue To: python-list@python.org Travis E. Oliphant [EMAIL PROTECTED] writes: I need to simulate scenarios

Re: Help me use my Dual Core CPU!

2006-09-13 Thread Paul Rubin
Robin Becker [EMAIL PROTECTED] writes: well these guys seem to think there are, perhaps it's a joke http://anandtech.com/mac/showdoc.aspx?i=2832p=6 Wow! Yes, it seems to be real (Clovertown 4-core cpu). See: http://www.tgdaily.com/2006/03/07/idf_keynotes_welcome_to_intel_3-point-0/ There's

Re: socket question

2006-09-13 Thread hg
Jean-Paul Calderone wrote: On Wed, 13 Sep 2006 08:13:43 -0500, hg [EMAIL PROTECTED] wrote: Hi, I am not sure whether this is a python-related question. If I have device A than sends XX bytes to device B, and device B does a recv(XX) using the default timeout, what could make device B

Re: socket question

2006-09-13 Thread hg
Diez B. Roggisch wrote: hg wrote: Hi, I am not sure whether this is a python-related question. If I have device A than sends XX bytes to device B, and device B does a recv(XX) using the default timeout, what could make device B wake-up with less than XX bytes received ? There exist

xinclude and pathnames

2006-09-13 Thread Tim Arnold
I'm using ElementTree to access some xml configuration files, and using the module's xinclude capability. I've got lines like this in the parent xml file (which lives in the same directory as the included xml file): xi:include href=/dept/app/doc/current/en/xml/asdf/asdf_syntaxterms.xml/ When I

eval(repr(object)) hardly ever works

2006-09-13 Thread Matthew Wilson
I understand that idea of an object's __repr__ method is to return a string representation that can then be eval()'d back to life, but it seems to me that it doesn't always work. For example it doesn't work for instances of the object class: In [478]: eval(repr(object()))

Re: best small database?

2006-09-13 Thread Kay Schluehr
Pierre Quentel wrote: Buzhug (like Karrigell and Strakell) is a Breton word ; Breton is the language spoken in Brittany, the westernmost part of France. Less and less spoken, actually, but I do, like all my ancestors. It is a close cousin of Welsh, and has common roots with Irish and Gaelic

Re: eval(repr(object)) hardly ever works

2006-09-13 Thread Hardcoded Software
Matthew Wilson wrote: I understand that idea of an object's __repr__ method is to return a string representation that can then be eval()'d back to life, but it seems to me that it doesn't always work. For example it doesn't work for instances of the object class: In [478]:

Re: eval(repr(object)) hardly ever works

2006-09-13 Thread skip
Matthew I understand that idea of an object's __repr__ method is to Matthew return a string representation that can then be eval()'d back Matthew to life, but it seems to me that it doesn't always work. No, where it's convenient that property is desirable. It's not a hard-and-fast

Re: table (ascii text) lin ayout recognition

2006-09-13 Thread Paul McGuire
James Stroud [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hello, I am looking for python code useful to process tables that are in ASCII text. The code must determine where are the columns (fields). Concerned tables for my application are various, but

Re: Gadfly server startup error

2006-09-13 Thread Steve Holden
Ralf Muschall wrote: Steve Holden wrote: You're already doing better than I am. On Cygwin 2.5rc2 and Windows 2.4.2 I can't even get it to runs its tests properly: I don't remember whether I looked into that at all. NameError: global name 'Server' is not defined

Re: eval(repr(object)) hardly ever works

2006-09-13 Thread Steve Holden
Matthew Wilson wrote: I understand that idea of an object's __repr__ method is to return a string representation that can then be eval()'d back to life, but it seems to me that it doesn't always work. For example it doesn't work for instances of the object class: In [478]:

Re: How to get the longest possible match with Python's RE module?

2006-09-13 Thread Frederic Rentsch
[EMAIL PROTECTED] wrote: Frederic Rentsch wrote: If you need regexes, why not just reverse-sort your expressions? This seems a lot easier and faster than writing another regex compiler. Reverse-sorting places the longer ones ahead of the shorter ones. Unfortunately, not all

Re: RELEASED Python 2.5 (release candidate 2)

2006-09-13 Thread Ant
Anthony Baxter wrote: ... code in 2.5 before the final release. *Please* try this release out and let us know about any problems you find. Not a problem with the release, but with the docs. I've just ported a module using the ElementTree package to 2.5, and the Module Index

Re: How to get the longest possible match with Python's RE module?

2006-09-13 Thread Frederic Rentsch
[EMAIL PROTECTED] wrote: Frederic Rentsch wrote: If you need regexes, why not just reverse-sort your expressions? This seems a lot easier and faster than writing another regex compiler. Reverse-sorting places the longer ones ahead of the shorter ones. Unfortunately, not all

Unit balancing

2006-09-13 Thread AbrahamLincolnIllinois
Greetings! I am working with a researcher who would be very happy if he could include units in his calculations. Then, if his complicated expression didn't result in kg/yr the program would stop and point out his error. Does Python (or SciPy or ..) offer this feature? Thanks for your help.

python threading

2006-09-13 Thread daniel
can someone give me a good threading tutorial thx -- http://mail.python.org/mailman/listinfo/python-list

Re: Are Python's reserved words reserved in places they dont need to be?

2006-09-13 Thread John Roth
metaperl wrote: -- python -i class = algebra File stdin, line 1 class = algebra ^ SyntaxError: invalid syntax Why isn' t the parser smart enough to see that class followed by an identifier is used for class definition but class followed by equals is a simple

Re: eval(repr(object)) hardly ever works

2006-09-13 Thread Matthew Wilson
On Wed 13 Sep 2006 10:38:03 AM EDT, Steve Holden wrote: That's intentional. Would you have it return the code of all the methods when you take the repr() of a class? I don't think that would be required. Couldn't you return a string with a call to the constructor inside? That's what sets.Set

pickle and instancemethod objects

2006-09-13 Thread Steven Bethard
I'd like to be able to pickle instancemethod objects mainly because I want to be able to delay a call like ``foo(spam, badger)`` by dumping ``foo``, ``spam`` and ``badger`` to disk and loading them again later. Sometimes the callable ``foo`` is actually a bound method, e.g. ``bar.baz``, but in

Windows bandwidth monitor

2006-09-13 Thread RunLevelZero
Hey guys, I've done some searching but can't seem to find anything that helps me out. I want to write a simple bandwidth monitor that will sit in the taskbar of windows and tell me my upload and download speeds. I intend to use wxpython for the little taskbar icon. If anyone can give me a helping

Re: Unit balancing

2006-09-13 Thread Tim Chase
I am working with a researcher who would be very happy if he could include units in his calculations. Then, if his complicated expression didn't result in kg/yr the program would stop and point out his error. Does Python (or SciPy or ..) offer this feature? Well, it's a bit of a hack,

Re: eval(repr(object)) hardly ever works

2006-09-13 Thread Fredrik Lundh
Matthew Wilson wrote: I understand that idea of an object's __repr__ method is to return a string representation that can then be eval()'d back to life, but it seems to me that it doesn't always work. when in doubt, read the language reference: If at all possible, this should look like

Re: Python blogging software

2006-09-13 Thread Fuzzyman
Cliff Wells wrote: On Wed, 2006-09-13 at 00:29 -0700, Cliff Wells wrote: Anyone aware of any functional (doesn't need to be complete, beta is fine) blog software written in Python? Hmph. And as soon as I hit send I find http://wiki.python.org/moin/PythonBlogSoftware Okay, so is

Re: Unit balancing

2006-09-13 Thread Jean-Paul Calderone
On 13 Sep 2006 07:47:41 -0700, [EMAIL PROTECTED] wrote: Greetings! I am working with a researcher who would be very happy if he could include units in his calculations. Then, if his complicated expression didn't result in kg/yr the program would stop and point out his error. Does Python (or

Re: Unit balancing

2006-09-13 Thread Simon Brunning
On 13 Sep 2006 07:47:41 -0700, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I am working with a researcher who would be very happy if he could include units in his calculations. Then, if his complicated expression didn't result in kg/yr the program would stop and point out his error. This what

Re: Windows bandwidth monitor

2006-09-13 Thread Tor Erik
RunLevelZero wrote: Hey guys, I've done some searching but can't seem to find anything that helps me out. I want to write a simple bandwidth monitor that will sit in the taskbar of windows and tell me my upload and download speeds. I intend to use wxpython for the little taskbar icon. If

Re: Unit balancing

2006-09-13 Thread Claudio Grondi
[EMAIL PROTECTED] wrote: Greetings! I am working with a researcher who would be very happy if he could include units in his calculations. Then, if his complicated expression didn't result in kg/yr the program would stop and point out his error. Does Python (or SciPy or ..) offer this

Re: Newbie - ? get IDLE going on cygwin

2006-09-13 Thread David J. Braden
Jason Tishler wrote: Dave, On Wed, Sep 13, 2006 at 09:42:48AM +, David J. Braden wrote: Thorsten Kampe wrote: * David J. Braden (2006-09-12 18:35 +0100) I can run Python in command-line mode fine from the cygwin shell; the cygwin distribution also includes IDLE, which is apparently

Re: How to write UNIX daemons in Python?

2006-09-13 Thread Martin v. Löwis
[EMAIL PROTECTED] schrieb: What should I use to do something like that? Do I have to use distutils? Do I have to use third party packages? Do I have to write a setup.py and solve the problem manually? This last solution is problematic becouse, for (dumb) example, Debian wants

  1   2   3   >