Re: [Python-Dev] PEP 384: Defining a Stable ABI

2009-05-18 Thread Martin v. Löwis
It also might make it easier for alternate implementations to support the same API so some modules could work cross implementation - but I suspect that's a non-goal of this PEP :). Indeed :-) I'm also skeptical that this would actually allow cross-implementation modules to happen. The

Re: Generating Tones With Python

2009-05-18 Thread John O'Hagan
On Mon, 18 May 2009, Adam Gaskins wrote: I am pretty sure this shouldn't be as hard as I'm making it to be, but how does one go about generating tones of specific frequency, volume, and L/R pan? I've been digging around the internet for info, and found a few examples. One was with gstreamer,

Re: Generating Tones With Python

2009-05-18 Thread Tim Harig
On 2009-05-18, Adam Gaskins agaskins...@kelleramerica.com wrote: I am pretty sure this shouldn't be as hard as I'm making it to be, but how does one go about generating tones of specific frequency, volume, and L/R pan? I've been digging around the internet for info, and found a few This can

Re: Conceptual flaw in pxdom?

2009-05-18 Thread Stefan Behnel
Emanuele D'Arrigo wrote: I'm looking at pxdom and in particular at its foundation class DOMObject I didn't know pxdom, but looking at it now I can see that it hasn't been updated since 2006. Not sure if that means that it is complete or that it has been abandoned. Anyway, seeing that it only

Re: Which C compiler?

2009-05-18 Thread Martin v. Löwis
Jive Dadson wrote: I am using Python 2.4. I need to make a native Python extension for Windows XP. I have both VC++ 6.0 and Visual C++ 2005 Express Edition. Will VC++ 6.0 do the trick? That would be easier for me, because the project is written for that one. If not, will the 2005 compiler

Re: Seeking old post on developers who like IDEs vs developers who like simple languages

2009-05-18 Thread Ulrich Eckhardt
Steve Ferg wrote: On the one hand, there are developers who love big IDEs with lots of features (code generation, error checking, etc.), and rely on them to provide the high level of support needed to be reasonably productive in heavy-weight languages (e.g. Java). On the other hand there

How to convert a list of strings to a tuple of floats?

2009-05-18 Thread boblat...@googlemail.com
Hello group, this is the conversion I'm looking for: ['1.1', '2.2', '3.3'] - (1.1, 2.2, 3.3) Currently I'm disassembling the list by hand, like this: fields = line.split('; ') for x in range(len(fields)): fields[x] = float(fields[x]) ftuple = tuple(fields) Of course it

Re: How to convert a list of strings to a tuple of floats?

2009-05-18 Thread alex23
On May 18, 5:51 pm, boblat...@googlemail.com boblat...@googlemail.com wrote: ['1.1', '2.2', '3.3'] - (1.1, 2.2, 3.3) Currently I'm disassembling the list by hand, like this:     fields = line.split('; ')     for x in range(len(fields)):         fields[x] = float(fields[x])     ftuple =

Re: How to convert a list of strings to a tuple of floats?

2009-05-18 Thread Chris Rebert
On Mon, May 18, 2009 at 12:51 AM, boblat...@googlemail.com boblat...@googlemail.com wrote: Hello group, this is the conversion I'm looking for: ['1.1', '2.2', '3.3'] - (1.1, 2.2, 3.3) Currently I'm disassembling the list by hand, like this:    fields = line.split('; ')    for x in

Re: How to convert a list of strings to a tuple of floats?

2009-05-18 Thread Ulrich Eckhardt
boblat...@googlemail.com wrote: this is the conversion I'm looking for: ['1.1', '2.2', '3.3'] - (1.1, 2.2, 3.3) Currently I'm disassembling the list by hand, like this: fields = line.split('; ') for x in range(len(fields)): fields[x] = float(fields[x]) ftuple =

Re: Generic web parser

2009-05-18 Thread Jeremiah Dodds
On Sat, May 16, 2009 at 2:18 PM, S.Selvam s.selvams...@gmail.com wrote: Hi all, I have to design web parser which will visit the given list of websites and need to fetch a particular set of details. It has to be so generic that even if we add new websites, it must fetch those details if

Prepackaged function args

2009-05-18 Thread boblat...@googlemail.com
Hello group, suppose I've got a function f() that takes N parameters, and a list (or tuple) arg[] with N elements that I'd like to pass as parameters. The straightforward function call looks like this: result = f(arg[0], arg[1], ..., arg[N-1]) Is there a less verbose way of accomlishing this?

Re: Conceptual flaw in pxdom?

2009-05-18 Thread Paul Boddie
On 18 Mai, 08:54, Stefan Behnel stefan...@behnel.de wrote: Emanuele D'Arrigo wrote: I'm looking at pxdom and in particular at its foundation class DOMObject I didn't know pxdom, but looking at it now I can see that it hasn't been updated since 2006. Not sure if that means that it is

Re: os.path.split gets confused with combined \\ and /

2009-05-18 Thread Ulrich Eckhardt
Stef Mientki wrote: I've to distribute both python files and data files. Everything is developed under windows and now the datafiles contains paths with mixed \\ and /. For your info: Some (!!!) parts of MS Windows understand forward slashes as path separators and disallows them in file names,

Re: Generic web parser

2009-05-18 Thread andrew cooke
http://groups.google.com/group/beautifulsoup/browse_thread/thread/d416dd19fdaa43a6 http://jjinux.blogspot.com/2008/10/python-some-notes-on-lxml.html andrew -- http://mail.python.org/mailman/listinfo/python-list

Re: How to convert a list of strings to a tuple of floats?

2009-05-18 Thread Ben Finney
boblat...@googlemail.com boblat...@googlemail.com writes: Hello group, this is the conversion I'm looking for: ['1.1', '2.2', '3.3'] - (1.1, 2.2, 3.3) Currently I'm disassembling the list by hand, like this: fields = line.split('; ') for x in range(len(fields)):

Re: Which C compiler?

2009-05-18 Thread Jive Dadson
P.s. I just found out that there's a new Express edition, 2008. (New to me, that is.) I'm installing it. -- http://mail.python.org/mailman/listinfo/python-list

Re: Prepackaged function args

2009-05-18 Thread Chris Rebert
On Mon, May 18, 2009 at 1:36 AM, boblat...@googlemail.com boblat...@googlemail.com wrote: Hello group, suppose I've got a function f() that takes N parameters, and a list (or tuple) arg[] with N elements that I'd like to pass as parameters. The straightforward function call looks like this:

Re: Prepackaged function args

2009-05-18 Thread John O'Hagan
On Mon, 18 May 2009, boblat...@googlemail.com wrote: Hello group, suppose I've got a function f() that takes N parameters, and a list (or tuple) arg[] with N elements that I'd like to pass as parameters. The straightforward function call looks like this: result = f(arg[0], arg[1], ...,

A newbie question about some code

2009-05-18 Thread Jim Qiu
Hi everyone. I am reading a python library code and found something i can not understand. Please help! class Envelope(object): def __init__(self,ta_info): self.ta_info = ta_info def writefilelist(self,ta_list,tofile): for filename in ta_list: fromfile =

Re: Adding a Par construct to Python?

2009-05-18 Thread jeremy
On 17 May, 22:27, Paul Boddie p...@boddie.org.uk wrote: On 17 Mai, 14:05, jer...@martinfamily.freeserve.co.uk wrote: From a user point of view I think that adding a 'par' construct to Python for parallel loops would add a lot of power and simplicity, e.g. par i in list:    

Re: A newbie question about some code

2009-05-18 Thread Rhodri James
On Mon, 18 May 2009 10:18:52 +0100, Jim Qiu bluefishe...@gmail.com wrote: Please check the blue highlighted part, I don't understand how the object get the property? Colours and highlighting don't come across in Usenet postings. Could you be a bit more specific. Which object, and what

Re: A newbie question about some code

2009-05-18 Thread Chris Rebert
On Mon, May 18, 2009 at 2:18 AM, Jim Qiu bluefishe...@gmail.com wrote: Hi everyone. I am reading a python library code and found something i can not understand. Please help! class Envelope(object):     def __init__(self,ta_info):         self.ta_info = ta_info     def

Re: Adding a Par construct to Python?

2009-05-18 Thread Diez B. Roggisch
Steven D'Aprano wrote: On Sun, 17 May 2009 20:34:00 +0200, Diez B. Roggisch wrote: My math-skills are a bit too rusty to qualify the exact nature of the operation, commutativity springs to my mind. And how is reduce() supposed to know whether or not some arbitrary function is

.pth in current directory: Why doesn't it work as the documentation says?

2009-05-18 Thread Philipp Hagemeister
Where is the fault in my reasoning here? 1) According to http://docs.python.org/dev/install/, The most convenient way is to add a path configuration file to a directory that’s already on Python’s path, (...). 2) Path configuration files have an extension of .pth, (...) 12 = 3) A file test.pth

Re: .pth in current directory: Why doesn't it work as the documentation says?

2009-05-18 Thread David Lyon
On Mon, 18 May 2009 11:49:15 +0200, Philipp Hagemeister phi...@phihag.de wrote: 1) According to http://docs.python.org/dev/install/, The most convenient way is to add a path configuration file to a directory that’s already on Python’s path, (...). It's true... 2) Path configuration files

Re: .pth in current directory: Why doesn't it work as the documentation says?

2009-05-18 Thread Christian Heimes
Philipp Hagemeister schrieb: Where is the fault in my reasoning here? Python processes .pth files only in some directories. The directories are * the global site-packages directory * the user site-packages directory (starting with Python 2.6) * and any directory that is added by a .pth file

How can i use Spread Sheet as Data Store

2009-05-18 Thread Kalyan Chakravarthy
Hi All, I have data in Spread Sheet ( First Name and Last Name), how can i see this data in Python code ( how can i use Spread Sheet as Data Store ) . -- Regards Kalyan -- http://mail.python.org/mailman/listinfo/python-list

Re: How can i use Spread Sheet as Data Store

2009-05-18 Thread Krishnakant
Hi Kaliyan, It is very simple. There is a library called odfpy which you can use to read and write odf documents. I highly recommend using open formats so that the API is clear and you can ask help if needed. The odfpy library has modules to create spreadsheets and read or write by row or sell

Re: [Python-Dev] PEP 384: Defining a Stable ABI

2009-05-18 Thread Michael Foord
Martin v. Löwis wrote: It also might make it easier for alternate implementations to support the same API so some modules could work cross implementation - but I suspect that's a non-goal of this PEP :). Indeed :-) I'm also skeptical that this would actually allow

Re: Python mail truncate problem

2009-05-18 Thread bieffe62
On 18 Mag, 05:51, David ww...@yahoo.com wrote: Hi, I am writing Python script to process e-mails in a user's mail account. What I want to do is to update that e-mail's Status to 'R' after processing it, however, the following script truncates old e- mails even though it updates that e-mail's

Re: .pth in current directory: Why doesn't it work as the documentation says?

2009-05-18 Thread Philipp Hagemeister
David Lyon wrote: (...) 12 = 3) A file test.pth with the content /example/ should result in sys.path containing /example/. No. Python, once finding the .pth will process it. Yes, but that processing will add /example/ to sys.path, right? 4) (the current directory) is the first element

Re: .pth in current directory: Why doesn't it work as the documentation says?

2009-05-18 Thread David Lyon
On Mon, 18 May 2009 14:34:33 +0200, Philipp Hagemeister phi...@phihag.de wrote: Yes, but that processing will add /example/ to sys.path, right? It actually works the other way around. The directories listed in sys.path are scanned for .pth files. You can add packages by listing them inside a

Re: Seeking old post on developers who like IDEs vs developers who like simple languages

2009-05-18 Thread Aahz
In article mff7e6-e43@satorlaser.homedns.org, Ulrich Eckhardt eckha...@satorlaser.com wrote: Steve Ferg wrote: On the one hand, there are developers who love big IDEs with lots of features (code generation, error checking, etc.), and rely on them to provide the high level of support

Re: Seeking old post on developers who like IDEs vs developers who like simple languages

2009-05-18 Thread Marco Mariani
Steve Ferg wrote: I periodically think of that blog, usually in circumstances that make me also think Boy, that guy really got it right. But despite repeated and prolonged bouts of googling I haven't been able to find the article again. I must be using the wrong search terms or something.

Re: .pth in current directory: Why doesn't it work as the documentation says?

2009-05-18 Thread Tim Golden
David Lyon wrote: On Mon, 18 May 2009 14:34:33 +0200, Philipp Hagemeister phi...@phihag.de wrote: Yes, but that processing will add /example/ to sys.path, right? It actually works the other way around. The directories listed in sys.path are scanned for .pth files. You can add packages by

Re: How to convert a list of strings to a tuple of floats?

2009-05-18 Thread Mike Kazantsev
On Mon, 18 May 2009 00:51:43 -0700 (PDT) boblat...@googlemail.com boblat...@googlemail.com wrote: this is the conversion I'm looking for: ['1.1', '2.2', '3.3'] - (1.1, 2.2, 3.3) Since itertools are useful in nearly every module and probably are imported already... import itertools as it

Re: .pth in current directory: Why doesn't it work as the documentation says?

2009-05-18 Thread Philipp Hagemeister
David Lyon wrote: On Mon, 18 May 2009 14:34:33 +0200, Philipp Hagemeister phi...@phihag.de wrote: Yes, but that processing will add /example/ to sys.path, right? It actually works the other way around. The directories listed in sys.path are scanned for .pth files. No, they are not. That's

Re: Generic web parser

2009-05-18 Thread S.Selvam
On Mon, May 18, 2009 at 1:59 PM, Jeremiah Dodds jeremiah.do...@gmail.comwrote: On Sat, May 16, 2009 at 2:18 PM, S.Selvam s.selvams...@gmail.com wrote: Hi all, I have to design web parser which will visit the given list of websites and need to fetch a particular set of details. It has to

Re: .pth in current directory: Why doesn't it work as the documentation says?

2009-05-18 Thread David Lyon
On Mon, 18 May 2009 14:05:50 +0100, Tim Golden m...@timgolden.me.uk wrote: According to http://docs.python.org/install/index.html and my own reasonably long experience of them, they're just a way of getting extra paths into sys.path. Well, fair enough... The docs referred to above do

Re: Python mail truncate problem

2009-05-18 Thread David
On May 18, 5:10 am, bieff...@gmail.com wrote: On 18 Mag, 05:51, David ww...@yahoo.com wrote: Hi, I am writing Python script to process e-mails in a user's mail account. What I want to do is to update that e-mail's Status to 'R' after processing it, however, the following script

Re: Concurrency Email List

2009-05-18 Thread Pete
On May 16, 2009, at 7:26 PM, Aahz wrote: [posted and e-mailed] On Sat, May 16, 2009, Pete wrote: python-concurre...@googlegroups.com is a new email list for discussion of concurrency issues in python. It arose out of Dave Beazley's class on the subject last week:

? 'in' operator and fallback to __getitem__

2009-05-18 Thread timh
Hi I am trying to understand something about how the 'in' operator (as in the following expression) if 'aa' in x: do_something() When trying to implement in support on a class it appears that if __contains__ doesn't exist in falls back to calling __getitem__ However strange things happen to

Re: ? 'in' operator and fallback to __getitem__

2009-05-18 Thread Marco Mariani
timh wrote: However strange things happen to the name passed to __getitem__ in the following example (and in fact in all varients I have triend the name/ key passed to __getitem__ is always the integer 0 I think it's scanning the container as a sequence and not as a mapping, hence the access

Re: How can i use Spread Sheet as Data Store

2009-05-18 Thread John Machin
Kalyan Chakravarthy kalyanchakravarthy at hyit.com writes: Hi All, I have data in Spread Sheet ( First Name and Last Name), how can i see  this data  in Python code ( how can i use Spread Sheet as Data Store ) . -- RegardsKalyan Hi Kalyan, A few questions ... the answers might

Re: Concurrency Email List

2009-05-18 Thread Aahz
On Mon, May 18, 2009, Pete wrote: On May 16, 2009, at 7:26 PM, Aahz wrote: On Sat, May 16, 2009, Pete wrote: python-concurre...@googlegroups.com is a new email list for discussion of concurrency issues in python. It arose out of Dave Beazley's class on the subject last week:

Re: ? 'in' operator and fallback to __getitem__

2009-05-18 Thread Jeff McNeil
On May 18, 11:22 am, timh zutes...@gmail.com wrote: Hi I am trying to understand something about how the 'in' operator (as in the following expression) if 'aa' in x:    do_something() When trying to implement in support on a class it appears that if __contains__ doesn't exist in falls

Re: ? 'in' operator and fallback to __getitem__

2009-05-18 Thread Tim Hoffman
Hi Marco Thats definately what I think is happening. I tried the following class yy(object): ... def __getitem__(self,name): ... raise KeyError(name) ... def __contains__(self,name): ... raise KeyError(name) ... aa = yy() 'll' in aa Traceback (most recent call last): File

Re: Seeking old post on developers who like IDEs vs developers who like simple languages

2009-05-18 Thread Gabor Urban
Hi guys, I think this issue is long-long displute over tools and IDE-s. No need to combine it with the question of the complexity of the programming language used. I know guys, who did every development project using a simple GVIM and command line tools, and vere extremly productive. Even in

pydb output vanishes when running nosetests doctests

2009-05-18 Thread jcervidae
Hi Pythonistas: When pydb.debugger() is launched from within my code or for some other reason pydb starts from inside a nosetests or doctest, I do not see any output from it. It appears the test has hung but it hasn't. If I type commands pydb obeys them I just can't see the results. How can I

Re: Just wondering

2009-05-18 Thread norseman
Dave Angel wrote: norseman wrote: div class=moz-text-flowed style=font-family: -moz-fixedMarco Mariani wrote: Gediminas Kregzde wrote: def doit(i): pass def main(): a = [0] * 1000 t = time() map(doit, a) print map time: + str(time() - t) Here you are calling a

Re: Python code-bloat tool-- warning n00b stuff...

2009-05-18 Thread david wright
- Original Message From: Robert Kern robert.k...@gmail.com To: python-list@python.org Sent: Saturday, May 16, 2009 3:55:11 PM Subject: Re: Python code-bloat tool-- warning n00b stuff... On 2009-05-16 12:13, anand j wrote: Hi, I am looking for a bunch of rules or a tool that

Fedora root access with python

2009-05-18 Thread Chris Hughes
I've written some software for ubuntu/debian linux and am porting it over to RPM-based distros and have relied heavily on gksu being called internally to perform root tasks with a graphical password. However fedora seems to have another system of authenticating root access, how do I do that

Re: Context manager, atexit processing, and PEP 3143 DaemonContext.close

2009-05-18 Thread Gunter Henriksen
Anyone else? If there is a function which triggers a one-shot switch, I like to have a way to find out if it has already been triggered, I prefer to have the function tell me if it triggered the switch or not, but I would not want that to be by raising an exception. --

Re: ? 'in' operator and fallback to __getitem__

2009-05-18 Thread Jeff McNeil
On May 18, 11:31 am, Tim Hoffman zutes...@gmail.com wrote: Hi Marco Thats definately what I think is happening. I tried the following class yy(object): ...   def __getitem__(self,name): ...     raise KeyError(name) ...   def __contains__(self,name): ...     raise KeyError(name) ...

The ultimate in voice-powered scripting in Windows... need help

2009-05-18 Thread John Doe
http://code.google.com/p/dragonfly/ The help I need probably requires a Python programmer to become familiar with the project. I cannot tell exactly how much syntax versus logic is involved. But if you have ever had any interest in voice/speech activated system wide scripting in Windows, this

Re: pydb output vanishes when running nosetests doctests

2009-05-18 Thread Diez B. Roggisch
jcervidae wrote: Hi Pythonistas: When pydb.debugger() is launched from within my code or for some other reason pydb starts from inside a nosetests or doctest, I do not see any output from it. It appears the test has hung but it hasn't. If I type commands pydb obeys them I just can't see

Re: Context manager, atexit processing, and PEP 3143 DaemonContext.close

2009-05-18 Thread MRAB
Gunter Henriksen wrote: Anyone else? If there is a function which triggers a one-shot switch, I like to have a way to find out if it has already been triggered, I prefer to have the function tell me if it triggered the switch or not, but I would not want that to be by raising an exception.

Re: How to get Exif data from a jpeg file

2009-05-18 Thread BJ Swope
On Sun, May 17, 2009 at 4:17 AM, Arnaud Delobelle arno...@googlemail.com wrote: Daniel Fetchinson fetchin...@googlemail.com writes: I need to get the creation date from a jpeg file in Python.  Googling brought up a several references to apparently defunct modules.  The best way I have

Re: Adding a Par construct to Python?

2009-05-18 Thread George Sakkis
On May 18, 5:27 am, jer...@martinfamily.freeserve.co.uk wrote: My suggestion is primarily about using multiple threads and sharing memory - something akin to the OpenMP directives that one of you has mentioned. To do this efficiently would involve removing the Global Interpreter Lock, or

Re: How can i use Spread Sheet as Data Store

2009-05-18 Thread Terry Reedy
Kalyan Chakravarthy wrote: Hi All, I have data in Spread Sheet ( First Name and Last Name), how can i see this data in Python code ( how can i use Spread Sheet as Data Store ) . I you have a choice, a plain text file is MUCH easier. Or, you can output a plain text data.csv

SQLObject 0.10.6

2009-05-18 Thread Oleg Broytmann
Hello! I'm pleased to announce version 0.10.6, a minor bugfix release of 0.10 branch 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

SQLObject 0.9.11

2009-05-18 Thread Oleg Broytmann
Hello! I'm pleased to announce version 0.9.11, a minor bugfix release of 0.9 branch 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

Re: ? 'in' operator and fallback to __getitem__

2009-05-18 Thread Terry Reedy
Tim Hoffman wrote: [i for i in aa] Traceback (most recent call last): File stdin, line 1, in ? File stdin, line 3, in __getitem__ KeyError: 0 Which suggests to me there must be some sort of order of precedence between __contains__ and __getitem__ and 'for' statement must change the order

Package problem

2009-05-18 Thread Sverre
I'm using Ubuntu and some of the packages in the repository are too old. So I got the thought to remove nearly all packages downloaded from the repository and install them with easy_install. Is this a way to go without greater problems? -- http://mail.python.org/mailman/listinfo/python-list

Advanced Python books?

2009-05-18 Thread kj
I have read a couple of learn Python-type books, and now I'm looking for some more advanced books on Python, something analogous to Effective Java or High-Order Perl. I've only been able to find Advanced Python 3 Programming Techniques, which, as far as I can tell, is only available as a Kindle

Re: Adding a Par construct to Python?

2009-05-18 Thread Terry Reedy
George Sakkis wrote: On May 18, 5:27 am, jer...@martinfamily.freeserve.co.uk wrote: My suggestion is primarily about using multiple threads and sharing memory - something akin to the OpenMP directives that one of you has mentioned. To do this efficiently would involve removing the Global

Re: Advanced Python books?

2009-05-18 Thread UrsusMaximus
You might try Expert Python Programming by Tarek Ziadé. It is a relatively recent book aimed at experts. There are several reviews of the book linked to from a href=http://www.awaretek.com/ book.htmlthis page/a. Ron On May 18, 1:04 pm, kj so...@987jk.com.invalid wrote: I have read a couple of

Re: Advanced Python books?

2009-05-18 Thread python
Take a look at Text Processing In Python by David Mertz. This book doesn't cover all your requirements, but its a well-written book that is more comprehensive than its title might indicate. There's also a free version of this book online. Malcolm --

Re: Which C compiler?

2009-05-18 Thread Jive Dadson
Martin v. Löwis wrote: Jive Dadson wrote: I am using Python 2.4. I need to make a native Python extension for Windows XP. I have both VC++ 6.0 and Visual C++ 2005 Express Edition. Will VC++ 6.0 do the trick? That would be easier for me, because the project is written for that one. If not,

Re: Package problem

2009-05-18 Thread A. Cavallo
On Monday 18 May 2009 20:52:52 Sverre wrote: I'm using Ubuntu and some of the packages in the repository are too old. So I got the thought to remove nearly all packages downloaded from the repository and install them with easy_install. Is this a way to go without greater problems? If you're

Re: Adding a Par construct to Python?

2009-05-18 Thread jeremy
On 18 May, 19:58, George Sakkis george.sak...@gmail.com wrote: On May 18, 5:27 am, jer...@martinfamily.freeserve.co.uk wrote: My suggestion is primarily about using multiple threads and sharing memory - something akin to the OpenMP directives that one of you has mentioned. To do this

Re: Adding a Par construct to Python?

2009-05-18 Thread jeremy
On 18 May, 21:07, Terry Reedy tjre...@udel.edu wrote: George Sakkis wrote: On May 18, 5:27 am, jer...@martinfamily.freeserve.co.uk wrote: My suggestion is primarily about using multiple threads and sharing memory - something akin to the OpenMP directives that one of you has mentioned. To

Re: ? 'in' operator and fallback to __getitem__

2009-05-18 Thread Dave Angel
Tim Hoffman wrote: Which suggests to me there must be some sort of order of precedence between __contains__ and __getitem__ and 'for' statement must change the order in some manner. Thanks for the reply T (Please don't top-post. It makes reading the quoted portions hard, since they're

Re: Adding a Par construct to Python?

2009-05-18 Thread Paul Boddie
On 18 Mai, 11:27, jer...@martinfamily.freeserve.co.uk wrote: Thanks for your responses to my original questions. Thanks for your interesting response! Paul, thanks for explaining about the pprocess module which appears very useful. I presume that this is using multiple operating system

urllib and keep-alive header

2009-05-18 Thread swellfr
I would like to know if it is possible to create a connection to a web server that keeps the underlying socket alive ( Connection : Keep- Alive header in the HTTP request ) between request ( and can also be closed on request ) Can someone provide me a small example showing it. Thx --

Re: Context manager, atexit processing, and PEP 3143 DaemonContext.close

2009-05-18 Thread Ben Finney
MRAB goo...@mrabarnett.plus.com writes: Gunter Henriksen wrote: If there is a function which triggers a one-shot switch, I like to have a way to find out if it has already been triggered, I prefer to have the function tell me if it triggered the switch or not, but I would not want that

Re: Python code-bloat tool-- warning n00b stuff...

2009-05-18 Thread David Stanek
On Mon, May 18, 2009 at 12:45 PM, david wright I would suggest looking into TDD (test driven development). This technique would be a good fit to eliminate you feeling of code bloat, in TDD you only write the necessary amount of code to make your test pass, hence you never write code that is

Re: Which C compiler?

2009-05-18 Thread Emile van Sebille
On 5/18/2009 1:27 PM Jive Dadson said... I love Python, but the update regimen is very frustrating. It's a misery to me why every major release requires new versions of so much application stuff. No other software that I use is like that. When I upgrade Windoze, I do not have to get new

Re: Photoimage on button appears pixelated when button is disabled

2009-05-18 Thread Dustan
On May 17, 7:11 am, Tim Golden m...@timgolden.me.uk wrote: Dustan wrote: On May 15, 2:59 pm, Dustan dustangro...@gmail.com wrote: In tkinter, when I place a photoimage on a button and disable the button, the image has background dots scattered through the image. Searching the web, I

Re: Which C compiler?

2009-05-18 Thread norseman
Jive Dadson wrote: Martin v. Löwis wrote: Jive Dadson wrote: I am using Python 2.4. I need to make a native Python extension for Windows XP. I have both VC++ 6.0 and Visual C++ 2005 Express Edition. Will VC++ 6.0 do the trick? That would be easier for me, because the project is written for

Re: Which C compiler?

2009-05-18 Thread norseman
Emile van Sebille wrote: On 5/18/2009 1:27 PM Jive Dadson said... I love Python, but the update regimen is very frustrating. It's a misery to me why every major release requires new versions of so much application stuff. No other software that I use is like that. When I upgrade Windoze,

Re: How can i use Spread Sheet as Data Store

2009-05-18 Thread John Machin
On May 19, 5:12 am, Terry Reedy tjre...@udel.edu wrote: Kalyan Chakravarthy wrote: Hi All,              I have data in Spread Sheet ( First Name and Last Name), how can i see  this data  in Python code ( how can i use Spread Sheet as Data Store ) . I you have a choice, a plain text file

Re: Adding a Par construct to Python?

2009-05-18 Thread Steven D'Aprano
On Mon, 18 May 2009 02:27:06 -0700, jeremy wrote: However I *do* actually want to add syntax to the language. I think that 'par' makes sense as an official Python construct - we already have had this in the Occam programming language for twenty-five years. The reason for this is ease of use.

Re: A newbie question about some code

2009-05-18 Thread Jim Qiu
On Mon, May 18, 2009 at 5:30 PM, Rhodri James rho...@wildebst.demon.co.ukwrote: On Mon, 18 May 2009 10:18:52 +0100, Jim Qiu bluefishe...@gmail.com wrote: Please check the blue highlighted part, I don't understand how the object get the property? Colours and highlighting don't come

Subversion commit from Python?

2009-05-18 Thread Jack Trades
I'm wondering if there's an easy way to do a 'svn commit' on a directory from Python. More Details: I have a wiki-like program that stores its data in a directory that I would like to put under version control to be able to roll back unwanted changes. The program is stored in two directories, a

Re: Adding a Par construct to Python?

2009-05-18 Thread Carl Banks
On May 18, 1:52 pm, jer...@martinfamily.freeserve.co.uk wrote: As I understand it the reason for the GIL is to prevent problems with garbage collection in multi-threaded applications. Not really. It's main purpose to prevent context switches from happening in the middle of some C code

Re: How can i use Spread Sheet as Data Store

2009-05-18 Thread Wincent
If you want to write to a csv file, the other option is savetxt in NumPy module. Best On May 19, 7:29 am, John Machin sjmac...@lexicon.net wrote: On May 19, 5:12 am, Terry Reedy tjre...@udel.edu wrote: Kalyan Chakravarthy wrote: Hi All,              I have data in Spread Sheet ( First

Re: Package problem

2009-05-18 Thread David Cournapeau
On Tue, May 19, 2009 at 4:52 AM, Sverre sverreodeg...@gmail.com wrote: I'm using Ubuntu and some of the packages in the repository are too old. So I got the thought to remove nearly  all packages downloaded from the repository and install them with easy_install. Is this a way to go without

Re: Package problem

2009-05-18 Thread David Cournapeau
On Tue, May 19, 2009 at 1:15 PM, David Cournapeau courn...@gmail.com wrote: something like virtualenv for packages using autotools. ^^^ Sorry, I meant setuptools here, not autotools David -- http://mail.python.org/mailman/listinfo/python-list

Re: A newbie question about some code

2009-05-18 Thread Dave Angel
Jim Qiu wrote: Hi everyone. I am reading a python library code and found something i can not understand. Please help! class Envelope(object): def __init__(self,ta_info): self.ta_info = ta_info def writefilelist(self,ta_list,tofile): for filename in ta_list:

Re: Subversion commit from Python?

2009-05-18 Thread Lawrence D'Oliveiro
In message 2904e7de-0a8d-4697-9c44- c83bb5319...@s31g2000vbp.googlegroups.com, Jack Trades wrote: Originally I had the 'data' directory in the same directory as the cgi scripts and was using os.system(svn commit), however I kept running into weird bugs with this method. What bugs? --

Re: How can i use Spread Sheet as Data Store

2009-05-18 Thread Jeff McNeil
On May 18, 11:45 pm, Wincent ronggui.hu...@gmail.com wrote: If you want to write to a csv file, the other option is savetxt in NumPy module. Best On May 19, 7:29 am, John Machin sjmac...@lexicon.net wrote: On May 19, 5:12 am, Terry Reedy tjre...@udel.edu wrote: Kalyan Chakravarthy

Re: Seeking old post on developers who like IDEs vs developers who like simple languages

2009-05-18 Thread Lawrence D'Oliveiro
In message mff7e6-e43@satorlaser.homedns.org, Ulrich Eckhardt wrote: If you took a look at Java, you would notice that the core language syntax is much simpler than Python's. I don't think it is. Look at things like private versus protected versus public with or without static and final,

Question about locals()

2009-05-18 Thread Gökhan SEVER
Hello, Could you please explain why locals() allow me to create variables that are not legal in Python syntax. Example: locals()['1abc'] = 55. Calling of 1abc results with a syntax error. Shouldn't it be better to raise an error during the variable creation time? Thank you Gökhan --

Re: Package problem

2009-05-18 Thread David Lyon
Hi David, I guess paraphrased you are saying don't touch your packages.. To my point of view, the needs of the developer override the priorities of the O/S house... We should expect old packages on our systems from the O/S and have an easier way to update them to whatever we want.. That's

Re: Seeking old post on developers who like IDEs vs developers who like simple languages

2009-05-18 Thread Lawrence D'Oliveiro
In message 07e5af6c-d41d-4a4a-8e2e- f27bc92c9...@f16g2000vbf.googlegroups.com, Steve Ferg wrote: On the one hand, there are developers who love big IDEs with lots of features (code generation, error checking, etc.), and rely on them to provide the high level of support needed to be reasonably

Re: Package problem

2009-05-18 Thread David Cournapeau
On Tue, May 19, 2009 at 1:31 PM, David Lyon david.l...@preisshare.net wrote: Hi David, I guess paraphrased you are saying don't touch your packages.. To my point of view, the needs of the developer override the priorities of the O/S house... We should expect old packages on our systems

Re: How can i use Spread Sheet as Data Store

2009-05-18 Thread Kalyan Chakravarthy
Hi John I am using Google Spread Sheet with 20 rows of data , OS is Windows XP Python2.6 Actually my requirement is in an web application when user enters User name and Password, back end i needs to check, is it they entered correct user name with password (

Re: Question about locals()

2009-05-18 Thread John O'Hagan
On Tue, 19 May 2009, Gökhan SEVER wrote: Hello, Could you please explain why locals() allow me to create variables that are not legal in Python syntax. Example: locals()['1abc'] = 55. Calling of 1abc results with a syntax error. Shouldn't it be better to raise an error during the variable

  1   2   >