Version 1.2 of mod_wsgi is now available.

2007-10-31 Thread Graham Dumpleton
Version 1.2 of mod_wsgi is now available. The software and documentation are both available from: http://www.modwsgi.org The mod_wsgi package consists of an Apache web server module designed and implemented specifically for hosting Python based web applications that support the WSGI interface

ordereddict 0.4 (incl. sorteddict)

2007-10-31 Thread Anthon van der Neut
I am pleased to announce version 0.4 of the ordereddict module. Changes: - added pickling - added optional relaxed initialisation/update (from unordered dicts) - added KVIO (Key Value Insertion Order ie. key moves to back on update) - implemented a seperate subtype sorteddict, with KSO (Key

SQLObject 0.7.9

2007-10-31 Thread Oleg Broytmann
Hello! I'm pleased to announce the 0.7.9 release of SQLObject. What is SQLObject = SQLObject is an object-relational mapper. Your database tables are described as classes, and rows are instances of those classes. SQLObject is meant to be easy to use and quick to get started

SQLObject 0.9.2

2007-10-31 Thread Oleg Broytmann
Hello! I'm pleased to announce the 0.9.2 release of SQLObject. What is SQLObject = SQLObject is an object-relational mapper. Your database tables are described as classes, and rows are instances of those classes. SQLObject is meant to be easy to use and quick to get started

PyCon 2008 - Call for Tutorials

2007-10-31 Thread Greg Lindstrom
PyCon 2008 is being held in Chicago this year. The general conference is March 14-16 with the proceeding day, March 13th, being the traditional tutorial day. We have had a lot of input on topics to cover and now we are looking for qualified instructors to sign up to present the sessions.

[ANN] Release 0.66.0 of Task Coach

2007-10-31 Thread Frank Niessink
Hi, I'm happy to announce release 0.66.0 of Task Coach. This release contains a few small feature enhancements, a few small bugfixes and a translation in Traditional Chinese. Bug fixed: * Make categories and category viewer more robust. Features added: * Added Traditional Chinese translation

PyCon 2008 - Tutorial HowTo

2007-10-31 Thread Greg Lindstrom
Thinking about presenting a tutorial at PyCon 2008? Here's a link with everything you would ever want to know. http://us.pycon.org/2008/tutorials/proposals/ PyCon simply would not exist without volunteers like YOU. Get involved today! --greg --

ANN: O'Reilly e-book, Getting Started with Pyparsing

2007-10-31 Thread Paul McGuire
I'm happy to report the release of the O'Reilly ShortCut, Getting Started With Pyparsing. This 65-page e-book goes into detail on Pyparsing's design rationale, basic features, and a succession of applications. Getting Started With Pyparsing covers a range of samples, from an extended version of

Re: why did these companies choose Tcl over Python

2007-10-31 Thread Tim Roberts
chewie54 [EMAIL PROTECTED] wrote: As an electronics engineer I use some very expensive EDA CAD tool programs that are scriptable using Tcl. I was wondering why these companies have choose to use Tcl instead of Python. Some of these are: Mentor Graphics ModelTech VHDL and Verilog simulator

marshal vs pickle

2007-10-31 Thread Evan Klitzke
The documentation for marshal makes it clear that there are no guarantees about being able to correctly deserialize marshalled data structures across Python releases. It also implies that marshal is not a general persistence module. On the other hand, the documentation seems to imply that

Python and SQLite release cycles

2007-10-31 Thread [EMAIL PROTECTED]
Hi, Official Python distro is very stable, with release cycle of around 1 year. However, to include the new version of SQLite, which has a much shorter release cycle, one has to rebuild the main Python distribution (to compile with the new SQLite headers) - this is from Python docs. Therefore,

Re: basic threading question

2007-10-31 Thread [david]
[EMAIL PROTECTED] wrote: On Oct 30, 7:58 pm, bambam [EMAIL PROTECTED] wrote: Are function variables thread safe? def f(a): # whatever return float(a) Is that OK? def f(a): #whatever b=a: #whatever: return float(b) Is that OK? Steve. Huh? If I have 37

Re: Python Interview Questions

2007-10-31 Thread konryd
- string building...do they use += or do they build a list and use .join() to recombine them efficiently I'm not dead sure about that, but I heard recently that python's been optimized for that behaviour. That means: using += is almost as fast as joining list. Besides, += is more obvious

Re: jpeg image read class

2007-10-31 Thread Marc 'BlackJack' Rintsch
On Wed, 31 Oct 2007 06:48:18 +, [EMAIL PROTECTED] wrote: i am new to python and PIL and was trying to write a class to read and write RGB color model jpeg images.. PIL already offers such a class. i came up with this class below..i want to know if this is the way to read/write the RGB

Re: Readline and record separator

2007-10-31 Thread Johny
On Oct 30, 8:44 pm, Bruno Desthuilliers [EMAIL PROTECTED] wrote: Johny a écrit : Is it possible to change record separator when using readline? As far as I know readline reads characters until found '\n' and it is the end of record for readline. This is not a record separator, but a

Re: object inheritance

2007-10-31 Thread praddy
On Oct 31, 8:26 am, Anand [EMAIL PROTECTED] wrote: On Oct 28, 1:16 am, Pradeep Jindal [EMAIL PROTECTED] wrote: On Friday 26 Oct 2007 6:21:57 pm Anand wrote: On Oct 26, 5:31 pm, Pradeep Jindal [EMAIL PROTECTED] wrote: Can you tell any specific use case for doing this? I have many

Re: basic threading question

2007-10-31 Thread Bryan Olson
[david] wrote: If I have 37 threads, all calling a large function 'f', are the formal parameters thread safe? That is, will the formal parameters be trashed? Do you need to use locks or semaphores before using formal parameters? Are the labels for formal parameters static? If I have

dynamically generating temporary files through python/cgi

2007-10-31 Thread Miss Pfeffe
How do you make a python out of a banana?!-- http://mail.python.org/mailman/listinfo/python-list

Re: Readline and record separator

2007-10-31 Thread Bruno Desthuilliers
Johny a écrit : On Oct 30, 8:44 pm, Bruno Desthuilliers [EMAIL PROTECTED] wrote: Johny a écrit : Is it possible to change record separator when using readline? As far as I know readline reads characters until found '\n' and it is the end of record for readline. This is not a record

Re: why did these companies choose Tcl over Python

2007-10-31 Thread Eddie Corns
chewie54 [EMAIL PROTECTED] writes: Hello, As an electronics engineer I use some very expensive EDA CAD tool programs that are scriptable using Tcl. I was wondering why these companies have choose to use Tcl instead of Python. Some of these are: Mentor Graphics ModelTech VHDL and Verilog

Re: Python and SQLite release cycles

2007-10-31 Thread Diez B. Roggisch
[EMAIL PROTECTED] wrote: Hi, Official Python distro is very stable, with release cycle of around 1 year. However, to include the new version of SQLite, which has a much shorter release cycle, one has to rebuild the main Python distribution (to compile with the new SQLite headers) - this is

Re: setting variables in outer functions

2007-10-31 Thread Dustan
On Oct 30, 11:29 am, Duncan Booth [EMAIL PROTECTED] wrote: Neil Cerutti [EMAIL PROTECTED] wrote: It's allows a standard programming idiom which provides a primitive form of object oriented programming using closures to represent state. def account(opening_balance): balance =

help with pyparsing

2007-10-31 Thread Neal Becker
I'm just trying out pyparsing. I get stack overflow on my first try. Any help? #/usr/bin/python from pyparsing import Word, alphas, QuotedString, OneOrMore, delimitedList first_line = '[' + delimitedList (QuotedString) + ']' def main(): string = '''[ 'a', 'b', 'cdef']''' greeting =

py2exe (or other exe builder) on Vista system for Vista/XP install targets.

2007-10-31 Thread Michael
I'm trying to build a exe on a vista system using py2exe. It will deploy to vista and XP systems. If it matters, the application uses pyserial, as well. I have VS Studio 2005 installed on this laptop as well. I've found this so far that seems to be identical to what I'm seeing (for non-python

Re: setting variables in outer functions

2007-10-31 Thread Duncan Booth
Dustan [EMAIL PROTECTED] wrote: On Oct 30, 11:29 am, Duncan Booth [EMAIL PROTECTED] wrote: Neil Cerutti [EMAIL PROTECTED] wrote: It's allows a standard programming idiom which provides a primitive form of object oriented programming using closures to represent state. def

Re: Creating a temporary file in Python

2007-10-31 Thread Diez B. Roggisch
looping wrote: Hi, I want to create a temporary file, read it in an external command and finally delete it (in Windows XP). I try to use tempfile module but it doesn't work, the file couldn't be open by my other process (error like: SP2-0310: unable to open file c:

Creating a temporary file in Python

2007-10-31 Thread looping
Hi, I want to create a temporary file, read it in an external command and finally delete it (in Windows XP). I try to use tempfile module but it doesn't work, the file couldn't be open by my other process (error like: SP2-0310: unable to open file c:

Re: A Python 3000 Question

2007-10-31 Thread Neil Cerutti
On 2007-10-30, Jean-Paul Calderone [EMAIL PROTECTED] wrote: On Tue, 30 Oct 2007 15:25:54 GMT, Neil Cerutti [EMAIL PROTECTED] wrote: On 2007-10-30, Eduardo O. Padoan [EMAIL PROTECTED] wrote: This is a FAQ:

Re: A Python 3000 Question

2007-10-31 Thread Neil Cerutti
On 2007-10-30, George Sakkis [EMAIL PROTECTED] wrote: On Oct 30, 11:25 am, Neil Cerutti [EMAIL PROTECTED] wrote: On 2007-10-30, Eduardo O. Padoan [EMAIL PROTECTED] wrote: This is a FAQ: http://effbot.org/pyfaq/why-does-python-use-methods-for-some-function... Holy Airy Persiflage Batman!

Re: Creating a temporary file in Python

2007-10-31 Thread looping
On Oct 31, 2:16 pm, Diez B. Roggisch [EMAIL PROTECTED] wrote: I'm not an expert, but I think you need to close the file first - you under windows here, which can be picky about such stuff AFAIK. Or maybe there is some other mode-specifier. Diez Actually closing the file delete it without

Re: A Python 3000 Question

2007-10-31 Thread George Sakkis
On Oct 31, 8:44 am, Neil Cerutti [EMAIL PROTECTED] wrote: On 2007-10-30, George Sakkis [EMAIL PROTECTED] wrote: On Oct 30, 11:25 am, Neil Cerutti [EMAIL PROTECTED] wrote: On 2007-10-30, Eduardo O. Padoan [EMAIL PROTECTED] wrote: This is a FAQ:

Re: Creating a temporary file in Python

2007-10-31 Thread Diez B. Roggisch
looping wrote: On Oct 31, 2:16 pm, Diez B. Roggisch [EMAIL PROTECTED] wrote: I'm not an expert, but I think you need to close the file first - you under windows here, which can be picky about such stuff AFAIK. Or maybe there is some other mode-specifier. Diez Actually closing the file

Re: py2exe (or other exe builder) on Vista system for Vista/XP install targets.

2007-10-31 Thread Bjoern Schliessmann
Michael wrote: [py2exe on Vista and XP] When I attempt to run, I get The procedure entry point _except_handler4_common could not be located in the dynamic link library mscvrt.dll. Apparently vista has one more _except_handler#_common function than XP does. Strange -- it works for me. I

Re: Creating a temporary file in Python

2007-10-31 Thread Sion Arrowsmith
looping [EMAIL PROTECTED] wrote: I want to create a temporary file, read it in an external command and finally delete it (in Windows XP). I try to use tempfile module but it doesn't work, the file couldn't be open by my other process (error like: SP2-0310: unable to open file c:

Re: marshal vs pickle

2007-10-31 Thread Bjoern Schliessmann
Evan Klitzke wrote: Can anyone elaborate more on the difference between marshal and pickle. In what conditions would using marshal be unsafe? If one can guarantee that the marshalled objects would be created and read by the same version of Python, is that enough? Just use pickle. From the

Re: marshal vs pickle

2007-10-31 Thread Aaron Watters
On Oct 31, 3:31 am, Evan Klitzke [EMAIL PROTECTED] wrote: Can anyone elaborate more on the difference between marshal and pickle. In what conditions would using marshal be unsafe? If one can guarantee that the marshalled objects would be created and read by the same version of Python, is that

Re: python in academics?

2007-10-31 Thread Floris Bruynooghe
On Oct 30, 3:39 am, sandipm [EMAIL PROTECTED] wrote: seeing posts from students on group. I am curious to know, Do they teach python in academic courses in universities? In Southampton Uni (UK) they do teach (some) Python to Engineering undergrads (aero, mech, ship, maybe more) thanks to one

Re: A Python 3000 Question

2007-10-31 Thread Duncan Booth
Neil Cerutti [EMAIL PROTECTED] wrote: But if I'm wrong about the performance benefits then I guess I'm still in the dark about why len is a builtin. The only compelling thing in the linked explation was the signatures of the guys who wrote the artible. (Guido does admit he would, hate to lose

Re: A Python 3000 Question

2007-10-31 Thread Neil Cerutti
On 2007-10-31, George Sakkis [EMAIL PROTECTED] wrote: On Oct 31, 8:44 am, Neil Cerutti [EMAIL PROTECTED] wrote: On 2007-10-30, George Sakkis [EMAIL PROTECTED] wrote: On Oct 30, 11:25 am, Neil Cerutti [EMAIL PROTECTED] wrote: On 2007-10-30, Eduardo O. Padoan [EMAIL PROTECTED] wrote:

Namespace question

2007-10-31 Thread Frank Aune
Hello, Is it possible writing custom modules named the same as modules in the standard library, which in turn use the same module from the standard library? Say I want my application to have a random.py module, which in turn must import the standard library random.py module also, to get hold

Re: A Python 3000 Question

2007-10-31 Thread Neil Cerutti
On 2007-10-31, Duncan Booth [EMAIL PROTECTED] wrote: Obviously it isn't an absolute thing: lists and dictionaries do have other methods in the user namespace, so the decision to keep len out of that namespace is partly a judgement call, and partly historical (I think tuples didn't used to have

shouldn't 'string'.find('ugh') return 0, not -1 ?

2007-10-31 Thread jelle
the subject pretty much says it all. if I check a string for for a substring, and this substring isn't found, should't the .find method return 0 rather than -1? this breaks the if check.find('something'): do(somethingElse) idiom, which is a bit of a pity I think. cheers, -jelle --

Fwd: Namespace question

2007-10-31 Thread Andrii V. Mishkovskyi
2007/10/31, Frank Aune [EMAIL PROTECTED]: Hello, Is it possible writing custom modules named the same as modules in the standard library, which in turn use the same module from the standard library? Say I want my application to have a random.py module, which in turn must import the

Re: _tkinter installation in python 2.5 on mandriva with a default 2.4

2007-10-31 Thread Martin v. Löwis
however make still complains of the non existance of the the Tcl/Tk libs and/or headers So where it tk.h located? Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: shouldn't 'string'.find('ugh') return 0, not -1 ?

2007-10-31 Thread Martin Marcher
2007/10/31, jelle [EMAIL PROTECTED]: the subject pretty much says it all. if I check a string for for a substring, and this substring isn't found, should't the .find method return 0 rather than -1? this breaks the IMHO 0 would mean the substring starts at index 0 of the iterable. If that

Re: shouldn't 'string'.find('ugh') return 0, not -1 ?

2007-10-31 Thread Andrii V. Mishkovskyi
2007/10/31, jelle [EMAIL PROTECTED]: the subject pretty much says it all. if I check a string for for a substring, and this substring isn't found, should't the .find method return 0 rather than -1? this breaks the if check.find('something'): do(somethingElse) idiom, which is a bit of

Re: shouldn't 'string'.find('ugh') return 0, not -1 ?

2007-10-31 Thread jelle feringa
What's your point? :/ that of making sure before you post and cause public emberassement? -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Interview Questions

2007-10-31 Thread Steven Bethard
konryd wrote: - string building...do they use += or do they build a list and use .join() to recombine them efficiently I'm not dead sure about that, but I heard recently that python's been optimized for that behaviour. That means: using += is almost as fast as joining list. For some

Re: A Python 3000 Question

2007-10-31 Thread Duncan Booth
Neil Cerutti [EMAIL PROTECTED] wrote: On 2007-10-31, Duncan Booth [EMAIL PROTECTED] wrote: Obviously it isn't an absolute thing: lists and dictionaries do have other methods in the user namespace, so the decision to keep len out of that namespace is partly a judgement call, and partly

Re: shouldn't 'string'.find('ugh') return 0, not -1 ?

2007-10-31 Thread Luis Zarrabeitia
the subject pretty much says it all. if I check a string for for a substring, and this substring isn't found, should't the .find method return 0 rather than -1? I belive str.find should return the first position where the substring appears. If string.find(ugh) were to return 0, how would you

Re: why did these companies choose Tcl over Python

2007-10-31 Thread Roy Smith
chewie54 [EMAIL PROTECTED] wrote: I would prefer to use Python but can't deny how popular Tcl is, as mentioned above, so my question is why wasn't Python selected by these companies as the choice of scripting languages for their product? Are there any obvious advantages like:

Python bug tracker now secret?

2007-10-31 Thread John Nagle
I'm now getting messages like this from the Python bug tracker on SourceForge: Artifact: This Artifact Has Been Made Private. Only Group Members Can View Private ArtifactTypes. I'm being denied access to bug reports I submitted, such as

Re: shouldn't 'string'.find('ugh') return 0, not -1 ?

2007-10-31 Thread Simon Brunning
On 10/31/07, jelle [EMAIL PROTECTED] wrote: the subject pretty much says it all. if I check a string for for a substring, and this substring isn't found, should't the .find method return 0 rather than -1? this breaks the if check.find('something'): do(somethingElse) print

Re: shouldn't 'string'.find('ugh') return 0, not -1 ?

2007-10-31 Thread Marc 'BlackJack' Rintsch
On Wed, 31 Oct 2007 13:31:06 +, jelle wrote: if I check a string for for a substring, and this substring isn't found, should't the .find method return 0 rather than -1? this breaks the if check.find('something'): do(somethingElse) idiom, which is a bit of a pity I think. And

Re: shouldn't 'string'.find('ugh') return 0, not -1 ?

2007-10-31 Thread Carsten Haese
On Wed, 2007-10-31 at 13:31 +, jelle wrote: the subject pretty much says it all. if I check a string for for a substring, and this substring isn't found, should't the .find method return 0 rather than -1? this breaks the if check.find('something'): do(somethingElse) idiom,

Re: shouldn't 'string'.find('ugh') return 0, not -1 ?

2007-10-31 Thread Hrvoje Niksic
jelle [EMAIL PROTECTED] writes: the subject pretty much says it all. if I check a string for for a substring, and this substring isn't found, should't the .find method return 0 rather than -1? How would you treat the case of 'something' being at the beginning of the string? After all, find

Re: shouldn't 'string'.find('ugh') return 0, not -1 ?

2007-10-31 Thread jelle feringa
There is a subtle point though. If the substring is not found '_'.find(' '), will return -1 Semanticly, I was expecting the that if the substring was not found, the conditional statement would not be found. However, python evaluates -1 to True, so that is what I do find confusing. So, I was

Re: Python bug tracker now secret?

2007-10-31 Thread Jean-Paul Calderone
On Wed, 31 Oct 2007 07:53:01 -0700, John Nagle [EMAIL PROTECTED] wrote: I'm now getting messages like this from the Python bug tracker on SourceForge: Artifact: This Artifact Has Been Made Private. Only Group Members Can View Private ArtifactTypes. I'm being denied access to bug reports I

capturing output of command line in an array

2007-10-31 Thread amjadcsu
Hi I am trying to execute a command using os.system. this command lists the number of nodes alive in a cluster. I would like to capture the output in list/array in python. IS it possible.?/ Here is my command gstat -a node13 2 (0/ 56) [ 0.00, 0.00, 0.00] [ 0.0, 0.0, 0.1, 99.9,

dictionary

2007-10-31 Thread Beema shafreen
hi everybody, I have a file 2709852 2709911A_16_P21360207405-59 2710316 2710367A_14_P136880-42-51 2710325 2710384A_16_P21360209876-59 2711260 2711319A_16_P21360210-22-59 2711297 2711356

Re: shouldn't 'string'.find('ugh') return 0, not -1 ?

2007-10-31 Thread Tim Chase
if I check a string for for a substring, and this substring isn't found, should't the .find method return 0 rather than -1? this breaks the if check.find('something'): do(somethingElse) idiom, which is a bit of a pity I think. That idiom is spelled: if 'something' in check:

Re: shouldn't 'string'.find('ugh') return 0, not -1 ?

2007-10-31 Thread J. Clifford Dyer
On Wed, Oct 31, 2007 at 03:55:49PM +0100, jelle feringa wrote regarding Re: shouldn't 'string'.find('ugh') return 0, not -1 ?: There is a subtle point though. If the substring is not found '_'.find(' '), will return -1 Semanticly, I was expecting the that if the substring was

Re: shouldn't 'string'.find('ugh') return 0, not -1 ?

2007-10-31 Thread Carl Banks
On Oct 31, 9:31 am, jelle [EMAIL PROTECTED] wrote: the subject pretty much says it all. if I check a string for for a substring, and this substring isn't found, should't the .find method return 0 rather than -1? this breaks the if check.find('something'): do(somethingElse) idiom,

Re: help with pyparsing

2007-10-31 Thread Paul McGuire
On Oct 31, 6:59 am, Neal Becker [EMAIL PROTECTED] wrote: I'm just trying out pyparsing. I get stack overflow on my first try. Any help? #/usr/bin/python from pyparsing import Word, alphas, QuotedString, OneOrMore, delimitedList first_line = '[' + delimitedList (QuotedString) + ']' def

Re: A Python 3000 Question

2007-10-31 Thread Carl Banks
On Oct 31, 8:44 am, Neil Cerutti [EMAIL PROTECTED] wrote: On 2007-10-30, George Sakkis [EMAIL PROTECTED] wrote: On Oct 30, 11:25 am, Neil Cerutti [EMAIL PROTECTED] wrote: On 2007-10-30, Eduardo O. Padoan [EMAIL PROTECTED] wrote: This is a FAQ:

RE: shouldn't 'string'.find('ugh') return 0, not -1 ?

2007-10-31 Thread Looney, James B
I believe most programming languages evaluate 0 to mean False, and anything else to be True (for the purposes of boolean evaluation). Python is no exception. From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of jelle feringa Sent:

Re: Python bug tracker now secret?

2007-10-31 Thread John Nagle
Jean-Paul Calderone wrote: On Wed, 31 Oct 2007 07:53:01 -0700, John Nagle [EMAIL PROTECTED] wrote: I'm now getting messages like this from the Python bug tracker on SourceForge: Artifact: This Artifact Has Been Made Private. Only Group Members Can View Private ArtifactTypes. I'm being

shouldn't 'string'.find('ugh') return 0, not -1 ?

2007-10-31 Thread jelle feringa
Hi Tim, Well, I this is another idiom in itself, right? Your checking if something is part of an iterable. I'm checking truth before entering a conditional expression. The latter is considered to be pythonic, right? -jelle On 10/31/07, Tim Chase [EMAIL PROTECTED] wrote: if I check a string

Re: why did these companies choose Tcl over Python

2007-10-31 Thread Kevin Walzer
chewie54 wrote: Hello, As an electronics engineer I use some very expensive EDA CAD tool programs that are scriptable using Tcl. I was wondering why these companies have choose to use Tcl instead of Python. Some of these are: Mentor Graphics ModelTech VHDL and Verilog simulator

Re: shouldn't 'string'.find('ugh') return 0, not -1 ?

2007-10-31 Thread jelle feringa
The statement that you want to test the truth of is s.find(q) = 0. In other words, you want to see that the substring was found at a valid (non-negative) location. As someone else pointed out, it would make more sense to use None instead of -1. I agree, that would be nice. You still

Re: Python bug tracker now secret?

2007-10-31 Thread Martin v. Löwis
I don't know why they chose to make the sf tracker private. Maybe that was the only way to remove write access. That, plus removing it means that people won't browse outdated information. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Creating a temporary file in Python

2007-10-31 Thread looping
On Oct 31, 2:16 pm, Sion Arrowsmith [EMAIL PROTECTED] wrote: [ ... ] Whether the name can be used to open the file a second time, while the named temporary file is still open, varies across platforms (it can be so used on Unix; it cannot on Windows NT or later). I didn't notice this

Re: why did these companies choose Tcl over Python

2007-10-31 Thread Paddy
On Oct 30, 10:47 pm, Martin v. Löwis [EMAIL PROTECTED] wrote: I would prefer to use Python but can't deny how popular Tcl is, as mentioned above, so my question is why wasn't Python selected by these companies as the choice of scripting languages for their product? I think this

Re: Python bug tracker now secret?

2007-10-31 Thread Martin v. Löwis
There are bug reports in the SourceForge tracker that aren't in the bugs.python.org tracker, so that move was botched. Which one in particular? Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Help with pyparsing and dealing with null values

2007-10-31 Thread avidfan
On Mon, 29 Oct 2007 05:45:26 -0700, Paul McGuire [EMAIL PROTECTED] wrote: On Oct 29, 1:11 am, avidfan [EMAIL PROTECTED] wrote: Help with pyparsing and dealing with null values I am trying to parse a log file (web.out) similar to this:

Re: Python bug tracker now secret?

2007-10-31 Thread Jean-Paul Calderone
On Wed, 31 Oct 2007 08:26:06 -0700, John Nagle [EMAIL PROTECTED] wrote: Jean-Paul Calderone wrote: On Wed, 31 Oct 2007 07:53:01 -0700, John Nagle [EMAIL PROTECTED] wrote: I'm now getting messages like this from the Python bug tracker on SourceForge: Artifact: This Artifact Has Been Made

Re: shouldn't 'string'.find('ugh') return 0, not -1 ?

2007-10-31 Thread jelle
if 'something' in check: do(somethingElse) Tim, you're absolutely right that the above makes far more sense in my case. Thanks for pointing that out. -jelle -- http://mail.python.org/mailman/listinfo/python-list

Re: shouldn't 'string'.find('ugh') return 0, not -1 ?

2007-10-31 Thread Tim Chase
Well, I this is another idiom in itself, right? Your checking if something is part of an iterable. I'm checking truth before entering a conditional expression. I'm not sure I follow. I simply replaced your if check.find('something') with if 'something' in check: which (1) is more

Re: Python bug tracker now secret?

2007-10-31 Thread Jean-Paul Calderone
On Wed, 31 Oct 2007 16:42:48 +0100, \Martin v. Löwis\ [EMAIL PROTECTED] wrote: I don't know why they chose to make the sf tracker private. Maybe that was the only way to remove write access. That, plus removing it means that people won't browse outdated information. Though it also means all

Re: capturing output of command line in an array

2007-10-31 Thread Lee Capps
On Oct 31, 2007, at 11:01 AM, [EMAIL PROTECTED] wrote: I am trying to execute a command using os.system. this command lists the number of nodes alive in a cluster. I would like to capture the output in list/array in python. IS it possible.?/ Here is my command gstat -a node13 2 (

Re: why did these companies choose Tcl over Python

2007-10-31 Thread Hrvoje Niksic
Roy Smith [EMAIL PROTECTED] writes: We also had lots of hooks into C code. Doing that is trivial in Tcl. Yes, I know you can extend/embed Python, but it's a LOT easier in Tcl. Embedding a Tcl interpreter in a C program is literally one line of code. Have you tried both or just Tcl? I've

Re: shouldn't 'string'.find('ugh') return 0, not -1 ?

2007-10-31 Thread jelle feringa
Thanks for your in-depth explanation Tim. Which is impossible to disagree with! On 10/31/07, Tim Chase [EMAIL PROTECTED] wrote: Well, I this is another idiom in itself, right? Your checking if something is part of an iterable. I'm checking truth before entering a conditional expression.

PyCon 2008 - Call for Tutorials

2007-10-31 Thread Greg Lindstrom
PyCon 2008 is being held in Chicago this year. The general conference is March 14-16 with the proceeding day, March 13th, being the traditional tutorial day. We have had a lot of input on topics to cover and now we are looking for qualified instructors to sign up to present the sessions.

Re: _tkinter installation in python 2.5 on mandriva with a default 2.4

2007-10-31 Thread wyleu
So where it tk.h located? tk.h is now in just about every directory called include that could in anyway be connected with this and indeed it does appear in the make file printout: /usr/bin/install -c -m 644 ./Include/sysmodule.h /usr/local/include/ python2.5 /usr/bin/install -c -m 644

Re: why did these companies choose Tcl over Python

2007-10-31 Thread Robin Becker
Martin v. Löwis wrote: ... I think this question needs to be answered on a case-by-case basis, but my guess is that it is in most cases historical. Work on Tcl started in 1988, and it was the first (major?) embeddable scripting language (that is also free software etc). Python wasn't

Re: _tkinter installation in python 2.5 on mandriva with a default 2.4

2007-10-31 Thread Martin v. Löwis
tk.h is now in just about every directory called include that could in anyway be connected with this and indeed it does appear in the make file printout: /usr/bin/install -c -m 644 ./Include/tk.h /usr/local/include/python2.5 How did you get tk.h into the Include directory? You shouldn't

Re: Python bug tracker now secret?

2007-10-31 Thread Martin v. Löwis
Though it also means all old links are broken and there's no obvious pointer to the new information. Not all of them, no. For a long time, people could use links of the form www.python.org/sf/bugnumber, and these links continue to work. Most other links on www.python.org have been fixed. I

Re: Fwd: Namespace question

2007-10-31 Thread Frank Aune
On Wednesday 31 October 2007 15:19:25 Andrii V. Mishkovskyi wrote: You mean something like this: import random def foo(): ...print '42' random.randit = foo random.randit() 42 am I right? -- I was thinking more of the line: random.py: (my custom random.py module) --- import

Re: simple? embedding question

2007-10-31 Thread Farshid Lashkari
[EMAIL PROTECTED] wrote: it works! could i cache maindict pointer in a global var or am i condemned to call PyObject* mainmod = PyImport_AddModule(__main__); assert(mainmod); PyObject* maindict = PyModule_GetDict(mainmod);

Method needed for skipping lines

2007-10-31 Thread Gustaf
Hi all, Just for fun, I'm working on a script to count the number of lines in source files. Some lines are auto-generated (by the IDE) and shouldn't be counted. The auto-generated part of files start with Begin VB.Form and end with End (first thing on the line). The End keyword may appear

Building libraries that my extensions can use. [distutils]

2007-10-31 Thread [EMAIL PROTECTED]
Hello all, I want to create a shared object that my extension modules can dynamically load with intact symbols across modules. Searching the documentation lead me to distutils.ccompiler. Quite frankly comprehending this has been difficult for the newbie in me. I did google (..and krugle) for setup

permuting over nested dicts?

2007-10-31 Thread Christian Meesters
Hoi, I have the following data structure (of variable size actually, to make things simple, just that one): d = {'a': {'x':[1,2,3], 'y':[4,5,6]}, 'b': {'x':[7,8,9], 'y':[10,11,12]}} This can be read as a dict of possibilities: The entities 'a' and 'b' have the parameters 'x' and 'y', each.

Re: Method needed for skipping lines

2007-10-31 Thread Marc 'BlackJack' Rintsch
On Wed, 31 Oct 2007 18:02:26 +0100, Gustaf wrote: Just for fun, I'm working on a script to count the number of lines in source files. Some lines are auto-generated (by the IDE) and shouldn't be counted. The auto-generated part of files start with Begin VB.Form and end with End (first thing on

Re: marshal vs pickle

2007-10-31 Thread Raymond Hettinger
On Oct 31, 6:45 am, Aaron Watters [EMAIL PROTECTED] wrote: I like to use marshal a lot because it's the absolutely fastest way to store and load data to/from Python. Furthermore because marshal is stupid the programmer has complete control. A lot of the overhead you get with the pickles

Re: Python bug tracker now secret?

2007-10-31 Thread Terry Reedy
John Nagle [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] | I'm now getting messages like this from the Python bug tracker on | SourceForge: | | Artifact: This Artifact Has Been Made Private. Only Group Members Can | View Private ArtifactTypes. This message actually comes from

Re: Metaclass vs Class factory

2007-10-31 Thread [EMAIL PROTECTED]
On Oct 30, 10:46 pm, Bruno Desthuilliers [EMAIL PROTECTED] wrote: The same as the difference between a class and a function that returns an instance. Thanks Bruno. Lorenzo -- http://mail.python.org/mailman/listinfo/python-list

Re: _tkinter installation in python 2.5 on mandriva with a default 2.4

2007-10-31 Thread wyleu
tk.h is searched-for in detect_tkinter. Check whether tklib, tcllib, tcl_includes and tk_includes all get set. This should take only a single print statement. Regards, Martin Ok I've cleared my increasingly frantic copies out [EMAIL PROTECTED] python2.5]# find / -name tk.h

Re: py2exe (or other exe builder) on Vista system for Vista/XP install targets.

2007-10-31 Thread Michael
Björn, what library files end up being in your dist directory for that project? Would you mind posting a copy of the output of dir? I'm curious to see if there is a discrepancy. --Michael On Oct 31, 9:22 am, Bjoern Schliessmann usenet- [EMAIL PROTECTED] wrote: Michael wrote: [py2exe

Re: permuting over nested dicts?

2007-10-31 Thread Paddy
On Oct 31, 5:21 pm, Christian Meesters [EMAIL PROTECTED] wrote: Hoi, I have the following data structure (of variable size actually, to make things simple, just that one): d = {'a': {'x':[1,2,3], 'y':[4,5,6]}, 'b': {'x':[7,8,9], 'y':[10,11,12]}} This can be read as a dict of

PyCon 2008 - Tutorial HowTo

2007-10-31 Thread Greg Lindstrom
Thinking about presenting a tutorial at PyCon 2008? Here's a link with everything you would ever want to know. http://us.pycon.org/2008/tutorials/proposals/ PyCon simply would not exist without volunteers like YOU. Get involved today! --greg --

  1   2   >