Re: How do I post to the wxPython mailing list?

2009-09-08 Thread PythonAB
On 8 sep 2009, at 02:25, Neil Hodgson wrote: PythonAB: I dont want to register with a google account, is there any way to use a non-gmail account? A Google account does not mean you have to use gmail. The Google account is used to handle your interaction with Google services and can be

Re: using python interpreters per thread in C++ program

2009-09-08 Thread sturlamolden
On 8 Sep, 04:22, ganesh wrote: > My application is a TCP server having multiple client connectons. C++ > PTHREADS are for each connected socket and the message received on the > socket is evaluated by python functions. > If I use only one process level python interpreter, then every thread > has

Re: using python interpreters per thread in C++ program

2009-09-08 Thread ganesh
On Sep 8, 2:46 pm, I V wrote: > Do you have to use threads? If you use a process per connection, rather > than a thread, each process will have its own GIL. No, i cannot change from threads to processes for handling connections. This will change the complete design of our application which is not

Re: using python interpreters per thread in C++ program

2009-09-08 Thread sturlamolden
On 8 Sep, 08:46, I V wrote: > Do you have to use threads? If you use a process per connection, rather > than a thread, each process will have its own GIL. If ganesh is using Linux or Unix (which pthreads indicate), fork() is just as efficient as threads. On Windows one would need to keep a farm

Re: using python interpreters per thread in C++ program

2009-09-08 Thread sturlamolden
On 8 Sep, 09:14, ganesh wrote: > No, i cannot change from threads to processes for handling > connections. This will change the complete design of our application > which is not feasilbe for python evaluation of the strings. So the problem is actually bad design? -- http://mail.python.org/mailm

Re: The future of Python immutability

2009-09-08 Thread Hendrik van Rooyen
On Monday 07 September 2009 20:26:02 John Nagle wrote: > Right. Tracking mutablity and ownership all the way down without > making the language either restrictive or slow is tough. > > In multi-thread programs, though, somebody has to be clear on who owns > what. I'm trying to figure out

Re: using python interpreters per thread in C++ program

2009-09-08 Thread Graham Dumpleton
On Sep 8, 9:28 am, Mark Hammond wrote: > I was referring to the > 'multiple interpreters in one process' feature of Python which is > largely deprecated, ... Can you please point to where in the documentation for Python it says that support for multiple interpreters in one process is 'largely dep

Migrate From PyQt3 to PyQt4

2009-09-08 Thread nusch
I want to migrate from qt,pyqt,pykde 3 to 4 and remove all *.py files to work with newer version, also after remove pyqt3support. How can I do it in easy way ? I've read here http://www.mail-archive.com/p...@riverbankcomputing.com/msg15009.html something about deprecation warning but can't see suc

Re: First release of pyfsevents

2009-09-08 Thread IngoognI
On Sep 8, 6:19 am, a...@pythoncraft.com (Aahz) wrote: > There's no direct equivalent to Linux inotify [...] pnotify ? ingo -- http://mail.python.org/mailman/listinfo/python-list

python web mail clients, are there any decent ones?

2009-09-08 Thread Bodo Lomo
Hi, I've been looking but it seems I cannot find a decent web mail client on a python platform. I'm looking for something like roundcube or conjoon or thehorde, but I don't want to use a PHP solution mostly because the web app is python (django) and I want to continue using the apache worker mpm (

Re: The future of Python immutability

2009-09-08 Thread Paul Rubin
Hendrik van Rooyen writes: > In any case - if you do not actually like juggling with knives, then you > should not be mucking around with concurrency, and by making the language > safe, you are taking the fun out. Oh come on, Erlang and Haskell both take care of it rather well. -- http://mail.

Re: The future of Python immutability

2009-09-08 Thread Steven D'Aprano
On Tue, 08 Sep 2009 09:38:51 +0200, Hendrik van Rooyen wrote: > On Monday 07 September 2009 20:26:02 John Nagle wrote: > >> Right. Tracking mutablity and ownership all the way down without >> making the language either restrictive or slow is tough. >> >> In multi-thread programs, though,

Re: logger module : Question about log message format

2009-09-08 Thread Vinay Sajip
jorma kala gmail.com> writes: > > > Hi,I've created a logger like this:    > LOG_FILENAME = 'test.txt' > fh=logging.FileHandler(LOG_FILENAME,'w') > logger1 = logging.getLogger('myLogger1') > logger1.addHandler(fh) > logger1.setLevel(logging.INFO)logger1.info('message from logger1') > > and wa

Regular Expression problem

2009-09-08 Thread ���m�ۤv...@����
I have the following source code import re d = 'RTCB\r\nsignature:\xf1\x11 \xde\x10\xfe\x0f\x9c\x10\xf6\xc9_\x10\xf3\xeb<\x10\xf2Zt\x10\xef\xd2\x91\x10\xe6\xe7\xfb\x10\xe5p\x99\x10\xe2\x1e\xdf\x10\xdb\x0e\x9f\x10\xd8p\x06\x10\xce\xb3_\x10\xcc\x8d\xe2\x10\xc8\x00\xa4\x10\xc

Re: Regular Expression problem

2009-09-08 Thread Vlastimil Brom
2009/9/8 找尋自己的一片天 : > I have the following source code > > > import re > d = 'RTCB\r\nsignature:\xf1\x11 > \xde\x10\xfe\x0f\x9c\x10\xf6\xc9_\x10\xf3\xeb<\x10\xf2Zt\x10\xef\xd2\x91\x10\xe6\xe7\xfb\x10\xe5p\x99\x10\xe2\x1e\xdf\x10\xdb\x0e\x9f\x10\xd8p\x06\x10\

Re: Question on File Input and AST

2009-09-08 Thread joy99
On Sep 6, 1:49 pm, Steven D'Aprano wrote: > On Sun, 06 Sep 2009 00:53:43 -0700,joy99wrote: > > Dear Group, > > > I have a file "test1.txt". Now, as I do the file handling, i try to do > > any one of the following operations. > > > 1. open_file=open("/python26/test1.txt","r") # FOR READING 2. > > o

Re: Regular Expression problem

2009-09-08 Thread Steven D'Aprano
On Tue, 08 Sep 2009 09:21:35 +, §äŽmŠÛ€vªº...@€ù€Ñ wrote: > I have the following source code > > > import re > d = 'RTCB\r\nsignature:\xf1\x11 > \xde\x10\xfe\x0f\x9c\x10\xf6\xc9_\x10\xf3\xeb<\x10\xf2Zt\x10\xef\xd2\x91 \x10\xe6\xe7\xfb\x10\xe5p\x99\x10\x

Modifying a row in a textfile

2009-09-08 Thread Olli Virta
Hi! I got a textfile made out of database records. Is there an easy way to modify rows in that file in case you have to take away some items here and there from each rows. Tanks! OV -- http://mail.python.org/mailman/listinfo/python-list

hanning python

2009-09-08 Thread Pierre
Hello, anyone knows what is the python equivalent of the matlab's hanning function. Note that in matlab hann and hanning are different. Thanks ! -- http://mail.python.org/mailman/listinfo/python-list

Re: Class variable inheritance

2009-09-08 Thread HPJ
> Makes sense to me. To step through what's happening: > > >>> A.n, B.n > (0, 0) > > Here, the lookup on B.n fails (that is, B itself has no variable n), > and thus falls back to A.n See, this is what tripped me up, right at the beginning. I thought B would inherit (as in copy) the variable n from

Re: hanning python

2009-09-08 Thread pdpi
On Sep 8, 12:36 pm, Pierre wrote: > Hello, > > anyone knows what is the python equivalent of the matlab's hanning > function. > > Note that in matlab hann and hanning are different. > > Thanks ! I assume you mean the tapering function mentioned here: http://mathworld.wolfram.com/HanningFunction.h

Re: Modifying a row in a textfile

2009-09-08 Thread Diez B. Roggisch
Olli Virta wrote: > Hi! > > I got a textfile made out of database records. Is there an easy way to > modify rows in that file in case you have to take away some items here > and there from each rows. for line in inf.readlines(): if matches_criteria(line): line = modify_line(line)

google tech talk code (threading module)

2009-09-08 Thread wiso
I took a little code from google tech talk. It seems interesting, but it doesn't work: import sys, urllib, os, threading, Queue q = Queue.Queue() class RetrWorker(threading.Thread): def run(self): self.setDaemon(True) def hook(*a): print (fn,a) while True:

Soap with python?

2009-09-08 Thread Otto Hellwig
Hi - Does anyone have a reccommendation on the best soap library for Python? Of the products I found, ZSI has had the most recent release 2007. Otto -- http://mail.python.org/mailman/listinfo/python-list

Re: google tech talk code (threading module)

2009-09-08 Thread MRAB
wiso wrote: I took a little code from google tech talk. It seems interesting, but it doesn't work: import sys, urllib, os, threading, Queue q = Queue.Queue() class RetrWorker(threading.Thread): def run(self): self.setDaemon(True) def hook(*a): print (fn,a) while Tr

Re: Soap with python?

2009-09-08 Thread Jim Wilson
On 09/08/2009 08:40 AM, Otto Hellwig wrote: > reccommend [sic ...] the best soap library ... Client side only? Suds (https://fedorahosted.org/suds/). Accept no subsitute! -- http://mail.python.org/mailman/listinfo/python-list

Re: hanning python

2009-09-08 Thread sturlamolden
On 8 Sep, 13:36, Pierre wrote: > anyone knows what is the python equivalent of the matlab's hanning > function. > > Note that in matlab hann and hanning are different. If you don't know how to compute a von Hann window, you are not competent to do any scientific programming. Seriously! I assume

Extracting patterns after matching a regex

2009-09-08 Thread Martin
Hi, I need to extract a string after a matching a regular expression. For example I have the string... s = "FTPHOST: e4ftl01u.ecs.nasa.gov" and once I match "FTPHOST" I would like to extract "e4ftl01u.ecs.nasa.gov". I am not sure as to the best approach to the problem, I had been trying to match

Re: hanning python

2009-09-08 Thread pdpi
On Sep 8, 1:55 pm, sturlamolden wrote: > On 8 Sep, 13:36, Pierre wrote: > > > anyone knows what is the python equivalent of the matlab's hanning > > function. > > > Note that in matlab hann and hanning are different. > > If you don't know how to compute a von Hann window, you are not > competent

Re: Extracting patterns after matching a regex

2009-09-08 Thread MRAB
Martin wrote: Hi, I need to extract a string after a matching a regular expression. For example I have the string... s = "FTPHOST: e4ftl01u.ecs.nasa.gov" and once I match "FTPHOST" I would like to extract "e4ftl01u.ecs.nasa.gov". I am not sure as to the best approach to the problem, I had been

Re: Extracting patterns after matching a regex

2009-09-08 Thread pdpi
On Sep 8, 1:56 pm, Martin wrote: > Hi, > > I need to extract a string after a matching a regular expression. For > example I have the string... > > s = "FTPHOST: e4ftl01u.ecs.nasa.gov" > > and once I match "FTPHOST" I would like to extract > "e4ftl01u.ecs.nasa.gov". I am not sure as to the best ap

Re: Extracting patterns after matching a regex

2009-09-08 Thread Mark Tolonen
"Martin" wrote in message news:5941d8f1-27c0-47d9-8221-d21f07200...@j39g2000yqh.googlegroups.com... Hi, I need to extract a string after a matching a regular expression. For example I have the string... s = "FTPHOST: e4ftl01u.ecs.nasa.gov" and once I match "FTPHOST" I would like to extract

[wxGlade] - How to add new event to a button in events tab

2009-09-08 Thread kaiqi chen
Hi, I am a newbie of wxGlade (0.6.2). I am trying buiding a simple application which is a frame contains a button. In the button properties window, select the events tab, there is a default event EVT_BUTTON, I have added a handler to this event, when I want to add a new event to the button here, b

Re: Extracting patterns after matching a regex

2009-09-08 Thread Mart.
On Sep 8, 2:15 pm, MRAB wrote: > Martin wrote: > > Hi, > > > I need to extract a string after a matching a regular expression. For > > example I have the string... > > > s = "FTPHOST: e4ftl01u.ecs.nasa.gov" > > > and once I match "FTPHOST" I would like to extract > > "e4ftl01u.ecs.nasa.gov". I am

[wxGlade] - How to add new event to a button in events tab

2009-09-08 Thread kaiqi chen
Hi, I am a starter of wxGlade (0.6.2). I am trying buiding a simple application which is a frame contains a button. In the button properties window, select the events tab, there is a default event EVT_BUTTON, I have added a handler to this event, when I want to add a new event to the button here,

Re: Migrate From PyQt3 to PyQt4

2009-09-08 Thread Dave Angel
nusch wrote: I want to migrate from qt,pyqt,pykde 3 to 4 and remove all *.py files to work with newer version, also after remove pyqt3support. How can I do it in easy way ? I've read here http://www.mail-archive.com/p...@riverbankcomputing.com/msg15009.html something about deprecation warning bu

Re: Extracting patterns after matching a regex

2009-09-08 Thread Mart.
On Sep 8, 2:21 pm, "Mark Tolonen" wrote: > "Martin" wrote in message > > news:5941d8f1-27c0-47d9-8221-d21f07200...@j39g2000yqh.googlegroups.com... > > > > > Hi, > > > I need to extract a string after a matching a regular expression. For > > example I have the string... > > > s = "FTPHOST: e4ftl01

Re: Class variable inheritance

2009-09-08 Thread Terry Reedy
HPJ wrote: Makes sense to me. To step through what's happening: A.n, B.n (0, 0) Here, the lookup on B.n fails (that is, B itself has no variable n), and thus falls back to A.n See, this is what tripped me up, right at the beginning. I thought B would inherit (as in copy) the variable n from

Re: Extracting patterns after matching a regex

2009-09-08 Thread Mart.
On Sep 8, 2:16 pm, "Andreas Tawn" wrote: > > Hi, > > > I need to extract a string after a matching a regular expression. For > > example I have the string... > > > s = "FTPHOST: e4ftl01u.ecs.nasa.gov" > > > and once I match "FTPHOST" I would like to extract > > "e4ftl01u.ecs.nasa.gov". I am not su

Re: Extracting patterns after matching a regex

2009-09-08 Thread pdpi
On Sep 8, 3:21 pm, nn wrote: > On Sep 8, 9:55 am, "Mart." wrote: > > > > > > > On Sep 8, 2:16 pm, "Andreas Tawn" wrote: > > > > > Hi, > > > > > I need to extract a string after a matching a regular expression. For > > > > example I have the string... > > > > > s = "FTPHOST: e4ftl01u.ecs.nasa.gov

Re: Extracting patterns after matching a regex

2009-09-08 Thread MRAB
Mart. wrote: On Sep 8, 3:14 pm, "Andreas Tawn" wrote: Hi, I need to extract a string after a matching a regular expression. For example I have the string... s = "FTPHOST: e4ftl01u.ecs.nasa.gov" and once I match "FTPHOST" I would like to extract "e4ftl01u.ecs.nasa.gov". I am not sure as to the b

Re: Extracting patterns after matching a regex

2009-09-08 Thread Mart.
On Sep 8, 3:53 pm, MRAB wrote: > Mart. wrote: > > On Sep 8, 3:14 pm, "Andreas Tawn" wrote: > > Hi, > > I need to extract a string after a matching a regular expression. For > > example I have the string... > > s = "FTPHOST: e4ftl01u.ecs.nasa.gov" > > and once I match "FTPHOST"

RE: Extracting patterns after matching a regex

2009-09-08 Thread Andreas Tawn
> > > Hi, > > > > > I need to extract a string after a matching a regular expression. For > > > example I have the string... > > > > > s = "FTPHOST: e4ftl01u.ecs.nasa.gov" > > > > > and once I match "FTPHOST" I would like to extract > > > "e4ftl01u.ecs.nasa.gov". I am not sure as to the best approa

Re: Extracting patterns after matching a regex

2009-09-08 Thread Mart.
On Sep 8, 3:14 pm, "Andreas Tawn" wrote: > > > > Hi, > > > > > I need to extract a string after a matching a regular expression. For > > > > example I have the string... > > > > > s = "FTPHOST: e4ftl01u.ecs.nasa.gov" > > > > > and once I match "FTPHOST" I would like to extract > > > > "e4ftl01u.ec

Re: Re: Extracting patterns after matching a regex

2009-09-08 Thread Dave Angel
Mart. wrote: I have been doing this to turn the email into a string email =ys.argv[1] f =open(email, 'r') s =str(f.readlines()) so FTPHOST isn't the first element, it is just part of a larger string. When I turn the email into a string it looks like... 'FINISHED: 09/07/2009 08:42:31\r\n', '\r

Re: Extracting patterns after matching a regex

2009-09-08 Thread Terry Reedy
Mart. wrote: On Sep 8, 2:15 pm, MRAB wrote: Martin wrote: Hi, I need to extract a string after a matching a regular expression. Whether or not you need re is an issue to be determined. >>> For example I have the string... s = "FTPHOST: e4ftl01u.ecs.nasa.gov" and once I match "FTPHOST" I wo

Re: incorrect DeprecationWarning (patch needed)

2009-09-08 Thread Alan G Isaac
On 9/5/2009 5:50 PM, Alan G Isaac wrote: I've filed a bug report: http://bugs.python.org/issue6844 This is now an accepted bug with a patch request. Can someone on this list please assist with a patch? Thanks, Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: Extracting patterns after matching a regex

2009-09-08 Thread nn
On Sep 8, 9:55 am, "Mart." wrote: > On Sep 8, 2:16 pm, "Andreas Tawn" wrote: > > > > > > Hi, > > > > I need to extract a string after a matching a regular expression. For > > > example I have the string... > > > > s = "FTPHOST: e4ftl01u.ecs.nasa.gov" > > > > and once I match "FTPHOST" I would lik

Output file formatting/loop problems -- HELP?

2009-09-08 Thread Maggie
My code is supposed to enumerate each line of file (1, 2, 3...) and write the new version into the output file -- #!/usr/bin/python import os.path import csv import sys #name of output file filename = "OUTPUT.txt" #open the file test = open ("test.txt", "r") #read in all the data into a list

Re: wxGlade question - How to add new event to a button in events tab?

2009-09-08 Thread Albert Hopkins
Could you not post the exact same message 3 times within an hour? -- http://mail.python.org/mailman/listinfo/python-list

Re: [Python-ideas] possible attribute-oriented class

2009-09-08 Thread Jim Jewett
On Mon, Sep 7, 2009 at 9:02 PM, Jan Kaliszewski wrote: > 08-09-2009 o 02:15:10 Steven D'Aprano wrote: >> ... what's wrong with this? > a['xyz'] = something['blablabla'] + somethingelse['foobar'] > b['ababababa'] += afun(bobo['dodo']['kookoo'] * pofopofo['gh'][0]['a']) > cupu['abc'] = (kukumunu['

wxGlade question - How to add new event to a button in events tab?

2009-09-08 Thread kaiqi chen
Hi, I am a starter of wxGlade (0.6.2). I am trying buiding a simple application which is a frame contains a button. In the button properties window, select the events tab, there is a default event EVT_BUTTON, I have added a handler to this event, when I want to add a new event to the button here,

RE: Extracting patterns after matching a regex

2009-09-08 Thread Andreas Tawn
> Hi, > > I need to extract a string after a matching a regular expression. For > example I have the string... > > s = "FTPHOST: e4ftl01u.ecs.nasa.gov" > > and once I match "FTPHOST" I would like to extract > "e4ftl01u.ecs.nasa.gov". I am not sure as to the best approach to the > problem, I had

Re: Extracting patterns after matching a regex

2009-09-08 Thread MRAB
Mart. wrote: On Sep 8, 3:53 pm, MRAB wrote: Mart. wrote: On Sep 8, 3:14 pm, "Andreas Tawn" wrote: Hi, I need to extract a string after a matching a regular expression. For example I have the string... s = "FTPHOST: e4ftl01u.ecs.nasa.gov" and once I match "FTPHOST" I would like to extract "e4

Re: Extracting patterns after matching a regex

2009-09-08 Thread nn
On Sep 8, 10:27 am, pdpi wrote: > On Sep 8, 3:21 pm, nn wrote: > > > > > On Sep 8, 9:55 am, "Mart." wrote: > > > > On Sep 8, 2:16 pm, "Andreas Tawn" wrote: > > > > > > Hi, > > > > > > I need to extract a string after a matching a regular expression. For > > > > > example I have the string... >

Re: Extracting patterns after matching a regex

2009-09-08 Thread nn
On Sep 8, 10:25 am, "Mart." wrote: > On Sep 8, 3:21 pm, nn wrote: > > > > > On Sep 8, 9:55 am, "Mart." wrote: > > > > On Sep 8, 2:16 pm, "Andreas Tawn" wrote: > > > > > > Hi, > > > > > > I need to extract a string after a matching a regular expression. For > > > > > example I have the string...

Re: Extracting patterns after matching a regex

2009-09-08 Thread nn
On Sep 8, 11:19 am, Dave Angel wrote: > Mart. wrote: > > > > I have been doing this to turn the email into a string > > > email =ys.argv[1] > > f =open(email, 'r') > > s =str(f.readlines()) > > > so FTPHOST isn't the first element, it is just part of a larger > > string. When I turn the email int

Re: Extracting patterns after matching a regex

2009-09-08 Thread nn
On Sep 8, 12:16 pm, nn wrote: > On Sep 8, 11:19 am, Dave Angel wrote: > > > > > Mart. wrote: > > > > > > I have been doing this to turn the email into a string > > > > email =ys.argv[1] > > > f =open(email, 'r') > > > s =str(f.readlines()) > > > > so FTPHOST isn't the first element, it is just p

Re: [Guppy-pe-list] An iteration idiom (Was: Re: loading files containing multiple dumps)

2009-09-08 Thread Sverker Nilsson
On Mon, 2009-09-07 at 16:53 +0100, Chris Withers wrote: > Sverker Nilsson wrote: > > I hope the new loadall method as I wrote about before will resolve this. > > > > def loadall(self,f): > > ''' Generates all objects from an open file f or a file named f''' > > if isinstance(f,basestring):

Distutils - can user designate install directory for windows installer?

2009-09-08 Thread Timothy W. Grove
I have successfully built a windows installer for my python program using distutils, (python setup.py bdist_wininst), but is there a way to do it that will allow a user ('user' == 'boss', in this case!) to designate the installation directory, rather than being forced to install into /Python/Li

Re: Output file formatting/loop problems -- HELP?

2009-09-08 Thread MRAB
Maggie wrote: On Sep 8, 11:39 am, MRAB wrote: Maggie wrote: My code is supposed to enumerate each line of file (1, 2, 3...) and write the new version into the output file -- #!/usr/bin/python import os.path import csv import sys #name of output file filename = "OUTPUT.txt" #open the file test

Re: Extracting patterns after matching a regex

2009-09-08 Thread Mart.
On Sep 8, 4:33 pm, MRAB wrote: > Mart. wrote: > > On Sep 8, 3:53 pm, MRAB wrote: > >> Mart. wrote: > >>> On Sep 8, 3:14 pm, "Andreas Tawn" wrote: > >>> Hi, > >>> I need to extract a string after a matching a regular expression. For > >>> example I have the string... > >>> s = "FT

Re: What python can NOT do?

2009-09-08 Thread Дамјан Георгиевски
> Boot loaders are another type of software which would be impractical > to write in existing Python implementations. I wonder if TinyPy (http://www.tinypy.org/) could be used to write a boot loader. It would probably need some more code to replace the services it uses from an OS, and perhaps it

Re: subprocess + python-daemon - bug/problem?

2009-09-08 Thread Sewar
I looked at other daemon libraries and snippets, it's clearly the bug is in subprocess not python-daemon. Then I found Python bug #1731717 which discusses it. I wish my project was opensource so I can post more specific test cases. #1731717 http://bugs.python.org/issue1731717 Thanks -- http://

Re: Extracting patterns after matching a regex

2009-09-08 Thread Mart.
On Sep 8, 3:21 pm, nn wrote: > On Sep 8, 9:55 am, "Mart." wrote: > > > > > On Sep 8, 2:16 pm, "Andreas Tawn" wrote: > > > > > Hi, > > > > > I need to extract a string after a matching a regular expression. For > > > > example I have the string... > > > > > s = "FTPHOST: e4ftl01u.ecs.nasa.gov" >

Re: Output file formatting/loop problems -- HELP?

2009-09-08 Thread Maggie
On Sep 8, 11:39 am, MRAB wrote: > Maggie wrote: > > My code is supposed to enumerate each line of file (1, 2, 3...) and > > write the new version into the output file -- > > > #!/usr/bin/python > > > import os.path > > import csv > > import sys > > > #name of output file > > filename = "OUTPUT.txt

Re: Output file formatting/loop problems -- HELP?

2009-09-08 Thread MRAB
Maggie wrote: My code is supposed to enumerate each line of file (1, 2, 3...) and write the new version into the output file -- #!/usr/bin/python import os.path import csv import sys #name of output file filename = "OUTPUT.txt" #open the file test = open ("test.txt", "r") #read in all the d

AUTO: Vacation (returning 09/08/2009)

2009-09-08 Thread gregory . miller
I am out of the office until 09/08/2009. I will respond to your message when I return. Note: This is an automated response to your message "Announcing: Python Open Mike blog" sent on 9/8/2009 10:10:46 AM. You will receive a notification for each message you send to this person while the pers

Re: Output file formatting/loop problems -- HELP?

2009-09-08 Thread Hendrik van Rooyen
On Tuesday 08 September 2009 17:22:30 Maggie wrote: > My code is supposed to enumerate each line of file (1, 2, 3...) and > write the new version into the output file -- > > #!/usr/bin/python > > import os.path > import csv > import sys > > #name of output file > filename = "OUTPUT.txt" > > > #open

Re: Extracting patterns after matching a regex

2009-09-08 Thread Terry Reedy
Mart. wrote: If, as Terry suggested, you do have a tuple of strings and the first element has FTPHOST, then s[0].split(":")[1].strip() will work. It is an email which contains information before and after the main section I am interested in, namely... FINISHED: 09/07/2009 08:42:31 MEDIATYPE

Re: hanning python

2009-09-08 Thread sturlamolden
On 8 Sep, 15:08, pdpi wrote: > Come, come. I think it's a good rule that, where available, a vendor- > supplied implementation is the preferable choice until proven > otherwise. Even for the simplest of equations? -- http://mail.python.org/mailman/listinfo/python-list

Re: The future of Python immutability

2009-09-08 Thread John Nagle
Steven D'Aprano wrote: On Tue, 08 Sep 2009 09:38:51 +0200, Hendrik van Rooyen wrote: On Monday 07 September 2009 20:26:02 John Nagle wrote: Right. Tracking mutablity and ownership all the way down without making the language either restrictive or slow is tough. In multi-thread progr

Re: The future of Python immutability

2009-09-08 Thread Daniel Fetchinson
>> > Is the difference because of mutability versus immutability, or >> > because of C code in Numpy versus Matlab code? Are you comparing >> > bananas and pears? >> >> It consisted of something like this > > > Your code does a lot of unnecessary work if you're just trying to > demonstrate immutabi

Re: Output file formatting/loop problems -- HELP?

2009-09-08 Thread Maggie
On Sep 8, 12:35 pm, MRAB wrote: > Maggie wrote: > > On Sep 8, 11:39 am, MRAB wrote: > >> Maggie wrote: > >>> My code is supposed to enumerate each line of file (1, 2, 3...) and > >>> write the new version into the output file -- > >>> #!/usr/bin/python > >>> import os.path > >>> import csv > >>>

Re: Soap with python?

2009-09-08 Thread Otto Hellwig
On Sep 8, 7:47 am, Jim Wilson wrote: > On 09/08/2009 08:40 AM, Otto Hellwig wrote: > > > reccommend [sic ...] the best soap library ... > > Client side only? Suds (https://fedorahosted.org/suds/). Accept no > subsitute! Thank you. I will give Suds a try. -- http://mail.python.org/mailman/lis

Help with cumulative sum

2009-09-08 Thread Maggie
Building on the code that I posted in one of the previous posts.. I need to find a cumulative sum of the file of the times in the test file: here is the code i have: #!/usr/bin/python import os.path #name of output file filename = "OUTPUT.txt" #open the file test = open ("test.txt", "rU") #re

start default application for read a pdf from python

2009-09-08 Thread Angelo Ballabio
I try to start a default application for reading a pdf file inside the python script. I try os.startfile(name,option) but say me startfile not implemented there are some system to start for example acrobar or okular from the script with a name of pdf file? thenks Angelo -- http://mail.pytho

Re: Help with cumulative sum

2009-09-08 Thread Maggie
On Sep 8, 3:29 pm, Maggie wrote: > Building on the code that I posted in one of the previous posts.. I > need to find a cumulative sum of the file of the times in the test > file: > > here is the code i have: > > #!/usr/bin/python > > import os.path > > #name of output file > filename = "OUTPUT.tx

Re: hanning python

2009-09-08 Thread Andreas Waldenburger
On Tue, 8 Sep 2009 11:12:18 -0700 (PDT) sturlamolden wrote: > On 8 Sep, 15:08, pdpi wrote: > > > Come, come. I think it's a good rule that, where available, a > > vendor- supplied implementation is the preferable choice until > > proven otherwise. > > Even for the simplest of equations? > Yes

Re: Math Notations, Computer Languages, and the “F orm” in Formalism

2009-09-08 Thread fortunatus
On Sep 7, 3:06 pm, Xah Lee wrote: ... > • systems for displaying math, such as TeX, Mathematica, MathML, > should be unified as part of the computer language's syntax. ... > ☄ to that end you might be interested in Fortress at Sun: http://projectfortress.sun.com/Projects/Community http://researc

Re: Help with cumulative sum

2009-09-08 Thread Maggie
On Sep 8, 4:17 pm, MRAB wrote: > Maggie wrote: > > On Sep 8, 3:29 pm, Maggie wrote: > >> Building on the code that I posted in one of the previous posts.. I > >> need to find a cumulative sum of the file of the times in the test > >> file: > > >> here is the code i have: > > >> #!/usr/bin/python

Re: Help with cumulative sum

2009-09-08 Thread MRAB
Maggie wrote: On Sep 8, 4:17 pm, MRAB wrote: Maggie wrote: On Sep 8, 3:29 pm, Maggie wrote: Building on the code that I posted in one of the previous posts.. I need to find a cumulative sum of the file of the times in the test file: here is the code i have: #!/usr/bin/python import os.path #

Re: Help with cumulative sum

2009-09-08 Thread Andreas Waldenburger
On Tue, 8 Sep 2009 12:49:23 -0700 (PDT) Maggie wrote: > On Sep 8, 3:29 pm, Maggie wrote: > > Building on the code that I posted in one of the previous posts.. I > > need to find a cumulative sum of the file of the times in the test > > file: > > > > here is the code i have: > > > > #!/usr/bin/py

Invitation to connect on LinkedIn

2009-09-08 Thread Manzur Ahmed
LinkedIn Manzur Ahmed requested to add you as a connection on LinkedIn: -- Jaime, I'd like to add you to my professional network on LinkedIn. - Manzur Accept invitation from Manzur Ahmed http://www.linkedin.com/e/I2LlXdLlWUhFABKmxVOlgGLlWUhF

Re: start default application for read a pdf from python

2009-09-08 Thread Grant Edwards
On 2009-09-08, Angelo Ballabio wrote: > I try to start a default application for reading a pdf file > inside the python script. > > I try > > os.startfile(name,option) but say me startfile not implemented Are you _sure_ it says startfile not implemented? Or does it say this: >>> os.startfil

Re: simple string question

2009-09-08 Thread Scott David Daniels
D'Arcy J.M. Cain wrote: On Mon, 7 Sep 2009 15:29:23 +1000 "jwither" wrote: Given a string (read from a file) which contains raw escape sequences, (specifically, slash n), what is the best way to convert that to a parsed string, where the escape sequence has been replaced (specifically, by a N

Re: Help with cumulative sum

2009-09-08 Thread Andreas Waldenburger
On Tue, 8 Sep 2009 13:23:43 -0700 (PDT) Maggie wrote: > On Sep 8, 4:17 pm, MRAB wrote: > [snip] > I saw my mistake...now it is telling me the following -- > > Traceback (most recent call last): > File "formisano_count.py", line 22, in > running_sum = running_sum + (int(item) * int(item)

Re: Help with cumulative sum

2009-09-08 Thread J. Cliff Dyer
If I gave you a list of numbers, could you come up with a summifier function that returns another list of numbers that are a cumulative sum? You've got the information in place to create a file def summifier(nums): """Returns a list of numbers that are the running sum totals of nums"""

Re: Help with cumulative sum

2009-09-08 Thread Maggie
On Sep 8, 4:05 pm, "J. Cliff Dyer" wrote: > If I gave you a list of numbers, could you come up with a summifier > function that returns another list of numbers that are a cumulative sum? > You've got the information in place to create a file > > def summifier(nums): >     """Returns a list of numb

Re: Help with cumulative sum

2009-09-08 Thread Maggie
On Sep 8, 3:49 pm, Maggie wrote: > On Sep 8, 3:29 pm, Maggie wrote: > > > > > Building on the code that I posted in one of the previous posts.. I > > need to find a cumulative sum of the file of the times in the test > > file: > > > here is the code i have: > > > #!/usr/bin/python > > > import os

Re: start default application for read a pdf from python

2009-09-08 Thread Angelo Ballabio
Sorry to not be very specific My problem is a way to run a default application to read and show a pdf file from unix or windows, i have a mixed ambient in the office, so I am try to find a way to start a application to show this pdf file I generate whith reportlab. actualy I write a file in a

Re: Class variable inheritance

2009-09-08 Thread HPJ
> I could, but I will let you read and find what it says about class > attributes. You think I would have asked specifically about the Language Reference if I hadn't read it and failed to find what I was looking for? The closest thing I was able to find was section 3.2. "The standard type hierarc

[ANNC] pybotwar-0.6

2009-09-08 Thread Lee Harr
pybotwar is a fun and educational game where players create computer programs to control simulated robots to compete in a battle arena. http://pybotwar.googlecode.com/ pybotwar uses pybox2d for the physical simulation, and uses either pygame and pygsear or PyQt4 for the visualization. pybotwar

Re: How do I post to the wxPython mailing list?

2009-09-08 Thread Mike Driscoll
On Sep 8, 2:14 am, PythonAB wrote: > On 8 sep 2009, at 02:25, Neil Hodgson wrote: > > > PythonAB: > > >> I dont want to register with a google account, > >> is there any way to use a non-gmail account? > > >   A Google account does not mean you have to use gmail. The Google > > account is used to

Re: Help with cumulative sum

2009-09-08 Thread MRAB
Maggie wrote: On Sep 8, 3:29 pm, Maggie wrote: Building on the code that I posted in one of the previous posts.. I need to find a cumulative sum of the file of the times in the test file: here is the code i have: #!/usr/bin/python import os.path #name of output file filename = "OUTPUT.txt"

make test curses on 3.1.1

2009-09-08 Thread Paul Watson
It appears that 3.1.1 built pretty cleanly on my SUSE 11 box. However, the curses test appears to fail. I see this message on the www.python.org site many times when searching Google, but the contents appears to have been removed. http://www.google.com/search?hl=en&as_q=test+test_curses+crashed+

Re: The future of Python immutability

2009-09-08 Thread Steven D'Aprano
On Tue, 08 Sep 2009 11:23:05 -0700, Daniel Fetchinson wrote: >> How does Matlab speed compare to Python in general? Ruby, for example, >> is an order of magnitude slower than Python (at least it was last time >> I looked) > > For what operations? Under what circumstances? I'm just being pedantic

Re: Class variable inheritance

2009-09-08 Thread Steven D'Aprano
On Tue, 08 Sep 2009 04:36:19 -0700, HPJ wrote: >> Makes sense to me. To step through what's happening: >> >> >>> A.n, B.n >> (0, 0) >> >> Here, the lookup on B.n fails (that is, B itself has no variable n), >> and thus falls back to A.n > > See, this is what tripped me up, right at the beginning.

Re: recursive decorator

2009-09-08 Thread Ethan Furman
Michele Simionato wrote: [snip] Yes, it is portable. BTW, here is what you want to do (requires decorator-3.1.2): from decorator import FunctionMaker def bindfunc(f): name = f.__name__ signature = ', '.join(FunctionMaker(f).args[1:]) # skip first arg return FunctionMaker.create(

Re: hanning python

2009-09-08 Thread Steven D'Aprano
On Tue, 08 Sep 2009 11:12:18 -0700, sturlamolden wrote: > On 8 Sep, 15:08, pdpi wrote: > >> Come, come. I think it's a good rule that, where available, a vendor- >> supplied implementation is the preferable choice until proven >> otherwise. > > Even for the simplest of equations? A decent vend

  1   2   >