Re: splitting a long string into a list

2006-11-27 Thread Cameron Walsh
ronrsr wrote: > still having a heckuva time with this. > > here's where it stand - the split function doesn't seem to work the way > i expect it to. > > > longkw1,type(longkw): Agricultural subsidies; Foreign > aid;Agriculture; Sustainable Agriculture - Support; Organic > Agriculture; Pesticid

Re: splitting a long string into a list

2006-11-27 Thread Peter Otten
ronrsr wrote: > still having a heckuva time with this. You don't seem to get it. > here's where it stand - the split function doesn't seem to work the way > i expect it to. > > > longkw1,type(longkw): Agricultural subsidies; Foreign > aid;Agriculture; Sustainable Agriculture - Support; Organ

Question about import and sys.path

2006-11-27 Thread Frank Millman
Hi all I am writing a business/accounting application. Once a user has logged in they are presented with a menu. Each menu option has a description and an associated file name and program name. The file name is the name of a .py file (impName) and the program name is the name of a class in that fi

Re: splitting a long string into a list

2006-11-27 Thread John Machin
ronrsr wrote: > I have a single long string - I'd like to split it into a list of > unique keywords. Sadly, the database wasn't designed to do this, so I > must do this in Python - I'm having some trouble using the .split() > function, it doesn't seem to do what I want it to - any ideas? > > thank

Re: Porting Tkinter application to JYthon

2006-11-27 Thread Tim N. van der Leeuw
Hi Sandip, sandip desale wrote: > Dear All, > > We have a Tcl/Tk application written using Python 2.2. Using this application > we want to call some customizable Java APIs. I tried porting Tcl/Tk > application to Jython but not able to do the same as TKinter library is not > available with JYth

Re: splitting a long string into a list

2006-11-27 Thread Tim Roberts
"ronrsr" <[EMAIL PROTECTED]> wrote: >I have a single long string - I'd like to split it into a list of >unique keywords. Sadly, the database wasn't designed to do this, so I >must do this in Python - I'm having some trouble using the .split() >function, it doesn't seem to do what I want it to - an

How to increase the speed of this program?

2006-11-27 Thread HYRY
I want to join two mono wave file to a stereo wave file by only using the default python module. Here is my program, but it is much slower than the C version, so how can I increase the speed? I think the problem is at line #1, #2, #3. import wave import array lfile = wave.open(lfilename) rfile = w

Re: splitting a long string into a list

2006-11-27 Thread ronrsr
still having a heckuva time with this. here's where it stand - the split function doesn't seem to work the way i expect it to. longkw1,type(longkw): Agricultural subsidies; Foreign aid;Agriculture; Sustainable Agriculture - Support; Organic Agriculture; Pesticides, US, Childhood Development, B

Re: Inheritance from builtin list and override of methods.

2006-11-27 Thread Fredrik Lundh
OKB (not okblacke) wrote: > Why doesn't it? because whoever wrote the class didn't do things that way, mostly for efficiency reasons. there's nothing in Python that keeps you from using template methods if you want, but that's a costly approach, so it's not very common. I suggest reading up

Re: splitting a long string into a list

2006-11-27 Thread Raphael
What exactly seems to be the problem? "ronrsr" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >I have a single long string - I'd like to split it into a list of > unique keywords. Sadly, the database wasn't designed to do this, so I > must do this in Python - I'm having some trouble

Re: splitting a long string into a list

2006-11-27 Thread Robert Kern
ronrsr wrote: > I have a single long string - I'd like to split it into a list of > unique keywords. Sadly, the database wasn't designed to do this, so I > must do this in Python - I'm having some trouble using the .split() > function, it doesn't seem to do what I want it to - any ideas? Did you f

Re: splitting a long string into a list

2006-11-27 Thread Cameron Walsh
ronrsr wrote: > I have a single long string - I'd like to split it into a list of > unique keywords. Sadly, the database wasn't designed to do this, so I > must do this in Python - I'm having some trouble using the .split() > function, it doesn't seem to do what I want it to - any ideas? > > thank

splitting a long string into a list

2006-11-27 Thread ronrsr
I have a single long string - I'd like to split it into a list of unique keywords. Sadly, the database wasn't designed to do this, so I must do this in Python - I'm having some trouble using the .split() function, it doesn't seem to do what I want it to - any ideas? thanks very much for your help.

splitting a long string into a list

2006-11-27 Thread ronrsr
I have a single long string - I'd like to split it into a list of unique keywords. Sadly, the database wasn't designed to do this, so I must do this in Python - I'm having some trouble using the .split() function, it doesn't seem to do what I want it to - any ideas? thanks very much for your help.

Re: Python script and C++

2006-11-27 Thread Ravi Teja
Thuan Seah Tan wrote: > Hi all, > > I am new to python and currently I am working on a traffic simulation > which I plan to define the various agents using scripting. It's kind of like > scripting for non-playable character in games. I am thinking of using python > for this but I am concerned

Re: About alternatives to Matlab

2006-11-27 Thread Niels L Ellegaard
Filip Wasilewski wrote: > As far as the speed comparison is concerned I totally agree that NumPy > can easily outperform Matlab in most cases. Of course one can use > compiled low-level extensions to speed up specific computations in > Matlab, but it's a lot easier and/or cheaper to find very good

RE: super() and type()

2006-11-27 Thread Delaney
Carl Banks wrote: > Unfortunately, short of hackery, you're stuck with having to write out > super(C,self). For my version of that particular hackery ... http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/286195 Tim Delaney -- http://mail.python.org/mailman/listinfo/python-list

Re: Inheritance from builtin list and override of methods.

2006-11-27 Thread OKB (not okblacke)
Carsten Haese wrote: > You can change the behavior of a list's sort method by overriding > sort. You can't change the behavior of sort by overriding > __getitem__ and __setitem__, because sort does not call __getitem__ > or __setitem__. Why doesn't it? -- --OKB (not okblacke) Brendan B

Re: NFS server

2006-11-27 Thread Stuart D. Gathman
On Fri, 24 Nov 2006 05:00:53 -0800, srj wrote: > i wish to develop an NFS server usin python from scratch( some wise guy > told me i'ts easy!). > can i get any kinda tutorial for this?? > > any suggestions on how 2 begin? NFS is an RPC based protocol. The first step is to be able to do SunRCP/O

Floating Exception

2006-11-27 Thread Jeremy
Hi, I just changed some previously-working Python program to add a C++ extension. Now, when I call __init__() in a Python class I did not change and with the same arguments passed, I get the screen message 'Floating exception' and the program seems to stop. The exact point of the crash in __in

Re: combining the path and fileinput modules SOLVED

2006-11-27 Thread Gabriel Genellina
At Sunday 26/11/2006 01:29, wo_shi_big_stomach wrote: for line in fileinput.input(g, inplace=1, backup='.bak'): # just print 2nd and subsequent lines if not fileinput.isfirstline(): print line.rstrip('\n') # check first line only elif fileinput.isfirstline

Re: Python script and C++

2006-11-27 Thread George Sakkis
Thuan Seah Tan wrote: > Hi all, > > I am new to python and currently I am working on a traffic simulation > which I plan to define the various agents using scripting. It's kind of like > scripting for non-playable character in games. I am thinking of using python > for this but I am concerned

MIME encoding change in Python 2.4.3 (or 2.4.2? 2.4.1?) - problem and solution

2006-11-27 Thread Nobody
I have an application that processes MIME messages. It reads a message from a file, looks for a text/html and text/plain parts in it, performs some processing on these parts, and outputs the new message. Ever since I recently upgraded my Python to 2.4.3, the output messages started to come out

Re: urllib2 spinning CPU on read

2006-11-27 Thread John J. Lee
"kdotsky" <[EMAIL PROTECTED]> writes: > Hello All, > I've ran into this problem on several sites where urllib2 will hang > (using all the CPU) trying to read a page. I was able to reproduce it > for one particular site. I'm using python 2.4 > > import urllib2 > url = 'http://www.wautomas.info'

Re: Python script and C++

2006-11-27 Thread nepBabu.cx
Thuan Seah Tan wrote: > Hi all, > > I am new to python and currently I am working on a traffic simulation > which I plan to define the various agents using scripting. It's kind of like > scripting for non-playable character in games. I am thinking of using python > for this but I am concer

Re: "fork and exit" needed?

2006-11-27 Thread [EMAIL PROTECTED]
Vincent Delporte wrote: > Hi > > I'm a Python newbie, and would like to rewrite this Perl scrip > to be run with the Asterisk PBX: > > http://www.voip-info.org/wiki/view/Asterisk+NetCID > > Anyone knows if those lines are necessary, why, and what their > alternative is in Python? > open STDO

Python script and C++

2006-11-27 Thread Thuan Seah Tan
Hi all, I am new to python and currently I am working on a traffic simulation which I plan to define the various agents using scripting. It's kind of like scripting for non-playable character in games. I am thinking of using python for this but I am concerned with running time. Is scriptin

Re: About alternatives to Matlab

2006-11-27 Thread sturlamolden
Rob Purser wrote: > Anyway, I just wanted to call your attention to Data Acquisition Toolbox: > http://www.mathworks.com/products/daq/ Absolutely. If the hardware is supported by this toolbox, there is no need to reinvent the wheel. The license is expensive, but development time can be far more

"fork and exit" needed?

2006-11-27 Thread Vincent Delporte
Hi I'm a Python newbie, and would like to rewrite this Perl scrip to be run with the Asterisk PBX: http://www.voip-info.org/wiki/view/Asterisk+NetCID Anyone knows if those lines are necessary, why, and what their alternative is in Python? --- open STDOUT, '>/dev/null'; fork and exi

Re: The Python Papers Edition One

2006-11-27 Thread [EMAIL PROTECTED]
Alan J. Salmoni wrote: > I heartily agree. pdf format has never been much of a problem for me. > Now that you have an ISSN, has it been submitted to Google Scholar or > other academic indexes? > > http://scholar.google.com/intl/en/scholar/about.html for Google Scholar > http://citeseer.ist.psu.edu

Re: Can you fix up wrapper function argument signatures?

2006-11-27 Thread Diez B. Roggisch
Gerard Brunick schrieb: > Consider: > > >>> def negate(func): > ... def wrapper(*args, **kwargs): > ... return not func(*args, **kwargs) > ... return wrapper > ... > >>> def f(x): > ... return x > 10 > ... > >>> g = negate(f) > >>> g(20) > False > >>> g(5) > True > > Now

Can you fix up wrapper function argument signatures?

2006-11-27 Thread Gerard Brunick
Consider: >>> def negate(func): ... def wrapper(*args, **kwargs): ... return not func(*args, **kwargs) ... return wrapper ... >>> def f(x): ... return x > 10 ... >>> g = negate(f) >>> g(20) False >>> g(5) True Now g has the argument signature of (*args, **kwargs). Pop-up

Re: windows background process

2006-11-27 Thread Podi
Gabriel Genellina wrote: > os.spawnl(os.P_NOWAIT, 'mycmd.exe', 'mycmd.exe', 'first_arg', 'second_arg') > That is, you must provide explicitely the value for argv[0] (executable) > Remember to quote appropiately any parameter with embedded spaces > (including the executable). On Python 2.5 you coul

Re: Calling a thread asynchronously with a callback

2006-11-27 Thread Fuzzyman
Diez B. Roggisch wrote: > Edwin Gomez wrote: > > > I'm a C# developer and I'm new to Python. I would like to know if the > > concept of Asynchronous call-backs exists in Python. Basically what I > > mean is that I dispatch a thread and when the thread completes it invokes > > a method from the c

Re: bz2.readline() slow ?

2006-11-27 Thread Jack Diederich
On Fri, Nov 24, 2006 at 10:11:06AM +, Soeren Sonnenburg wrote: > Dear all, > > I am a bit puzzled, as > > -snip- > import bz2 > f=bz2.BZ2File('data/data.bz2'); > > while f.readline(): > pass > -snip- > > takes twice the time (10 seconds) to read/decode a bz2 file > c

Re: How good is CORBA?

2006-11-27 Thread Ravi Teja
On Nov 21, 11:20 am, "Sai Krishna M" <[EMAIL PROTECTED]> wrote: > there are certainly client/server interactions. But are they cross-language interactions? This is how I would choose to distribute code. Same machine, all in Python - organize in modules in Python path. Different machines, all in P

Re: case insensitive dictionary

2006-11-27 Thread John Henry
I believe that if you redefine the value, the key should not change. So, yes, I would expect that they value of the key to remain as they were. J. Clifford Dyer wrote: > John Henry wrote: > >print pets.keys() > > > > should print: > > > > "Cat", "Dog" > > If you do: > > Py> pets['Cat'] = 2 >

Re: case insensitive dictionary

2006-11-27 Thread Fuzzyman
John Henry wrote: > I believe the standard dictionary should be amened to allow the use of > case insensitive keys - as an option. I found some work done by others > to do that at: > > http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/283455 > > but the problem with that approach is that th

Re: Python-list Digest, Vol 38, Issue 390

2006-11-27 Thread Edwin Gomez
Regarding Topic number 3: 3. Calling a thread asynchronously with a callback (Edwin Gomez): Thanks Bjorn for you quick answer and by the way, that works. Diez, in answer to your question regarding async callbacks in C#; C# runs in a multi threaded apartments. Many times we'll setup listener ob

Re: super() and type()

2006-11-27 Thread Rob Williscroft
Chris Mellon wrote in news:[EMAIL PROTECTED] in comp.lang.python: > I see super documented, and in use, as below (from the Python > documentation) > > class C(B): > def meth(self, arg): > super(C, self).meth(arg) > > I'd like to not write C all the time, so is there any problem wit

Re: super() and type()

2006-11-27 Thread Carl Banks
Chris Mellon wrote: > I see super documented, and in use, as below (from the Python documentation) > > class C(B): > def meth(self, arg): > super(C, self).meth(arg) > > I'd like to not write C all the time, so is there any problem with writing: > > class C(B): > def meth(self, arg):

Re: Several entries on Tile and TableList at the Tkinter wiki

2006-11-27 Thread Gheorghe Postelnicu
Hi, Thanks for pointing out this resource. I have indeed used Tkinter in a couple of applications, but I knew nothing about this wiki. This is very helpful. Thanks, -- Gheorghe Postelnicu, PhD MGH, Harvard Medical School -- http://mail.python.org/mailman/listinfo/python-list

Re: can't get cgi values

2006-11-27 Thread robert
ronrsr wrote: > Thank you, all. that was very helpful, and did solve many of my > problems. I was addressing the dict with () rather than []. > > I'm still having one problem, though -- extracting the keywords. NOw, > if you check the value for Form below, you'll see there is more than > one key

Re: Generating header information using ElementTree

2006-11-27 Thread metaperl
And dont forget that you can use triple quotes to get rid of all the quote-escaping you are using: $ python >>> """ ... ... ho ... ... """ '\n\nho\n\n' >>> Craig wrote: > John Machin wrote: > > > Craig wrote: > > > > > Great. Got that sorted. The problem I have now is that some of the > > >

Re: can't get cgi values

2006-11-27 Thread ronrsr
Thank you, all. that was very helpful, and did solve many of my problems. I was addressing the dict with () rather than []. I'm still having one problem, though -- extracting the keywords. NOw, if you check the value for Form below, you'll see there is more than one keyword entry. When I do: k

Re: Passing com object from simple xmlrpc server to client

2006-11-27 Thread Diez B. Roggisch
tsjuan schrieb: > Hello python users, > > I am just learning on how to use xmlrpc and stumbled upon how to pass > com object > from server to client side. > > The client side complain about can't marshall the com object. I don't > know what type > of marshall command I should use to pass the obje

Re: can't get cgi values

2006-11-27 Thread ronrsr
Thank you, all. that was very helpful, and did solve many of my problems. I was addressing the dict with () rather than []. I'm still having one problem, though -- extracting the keywords. NOw, if you check the value for Form below, you'll see there is more than one keyword entry. When I do: k

pyxpcom

2006-11-27 Thread hg
Hi, Can one tell me what the status of this project is ?. I did google ... but not much out there. Regards, hg -- http://mail.python.org/mailman/listinfo/python-list

Re: case insensitive dictionary

2006-11-27 Thread J. Clifford Dyer
John Henry wrote: >print pets.keys() > > should print: > > "Cat", "Dog" If you do: Py> pets['Cat'] = 2 Py> pets['Dog'] = 3 Py> pets['DOG'] = 4 Py> pets['cat'] += 5 Py> pets.keys() What should the result be? "['Cat', 'Dog']" or "['cat', 'DOG']"? That is to say, if you use a new case in r

Re: Inheritance from builtin list and override of methods.

2006-11-27 Thread Carsten Haese
On Mon, 2006-11-27 at 19:14 +, OKB (not okblacke) wrote: > Duncan Booth wrote: > > >> And is there a mechanism in Python that will allow me to override > >> the operators of a class, for all its occurrences, even the ones > >> implemented on C built-in objects? > > > > No. > > For wha

Re: python skipping lines?

2006-11-27 Thread lisa . engblom
Thanks, everyone for replying so promptly. I got it to work the way I intended, and have some ideas for how to make it much cleaner. - Lisa -- http://mail.python.org/mailman/listinfo/python-list

Re: python skipping lines?

2006-11-27 Thread Tim Chase
I'm not sure if this will /solve/ your problem, but it's something I noticed... > UnitList = open('/Python25/working/FacList.txt', 'r') > RawData = open('/Python25/working/data.txt', 'r') Here, you open RawData once... > Output = open('/Python25/working/output.txt', 'a') > > def PullHourlyData

Re: python skipping lines?

2006-11-27 Thread Jussi Salmela
[EMAIL PROTECTED] wrote: > RawData = open('/Python25/working/data.txt', 'r') You open this file only once. The first time in here: > def PullHourlyData(filename, facility, unit): > for line in filename: reads all of the file - nothing left for the other function calls! A better way wou

Re: Inheritance from builtin list and override of methods.

2006-11-27 Thread OKB (not okblacke)
Duncan Booth wrote: >> And is there a mechanism in Python that will allow me to override >> the operators of a class, for all its occurrences, even the ones >> implemented on C built-in objects? > > No. For what it's worth, which is undoubtedly nothing, this is something that I think n

Passing com object from simple xmlrpc server to client

2006-11-27 Thread tsjuan
Hello python users, I am just learning on how to use xmlrpc and stumbled upon how to pass com object from server to client side. The client side complain about can't marshall the com object. I don't know what type of marshall command I should use to pass the object. Below are my scripts, any hel

Re: python skipping lines?

2006-11-27 Thread Larry Bates
[EMAIL PROTECTED] wrote: > thats easy enough to solve > > """test text.py > for playing around with my text editing task > """ > > UnitList = open('/Python25/working/FacList.txt', 'r') > RawData = open('/Python25/working/data.txt', 'r') > Output = open('/Python25/working/output.txt', 'a') > > de

Re: python skipping lines?

2006-11-27 Thread lisa . engblom
thats easy enough to solve """test text.py for playing around with my text editing task """ UnitList = open('/Python25/working/FacList.txt', 'r') RawData = open('/Python25/working/data.txt', 'r') Output = open('/Python25/working/output.txt', 'a') def PullHourlyData(filename, facility, unit):

Re: can't get cgi values

2006-11-27 Thread robert
ronrsr wrote: > I'm having trouble extracting cgi parameters in my code - this is a web > application, so I only know the line that's causing the problem. if exceptions try "import cgitb; cgitb.enable()" to get a traces directly in HTML for testing; otherwise read the server log (logs of httpd et

Re: python skipping lines?

2006-11-27 Thread Jordan Greenberg
[EMAIL PROTECTED] wrote: > Hi, > Any ideas of what could be the problem? > Hard to say without seeing your code. Jordan Greenberg -- Posted via a free Usenet account from http://www.teranews.com -- http://mail.python.org/mailman/listinfo/python-list

super() and type()

2006-11-27 Thread Chris Mellon
I see super documented, and in use, as below (from the Python documentation) class C(B): def meth(self, arg): super(C, self).meth(arg) I'd like to not write C all the time, so is there any problem with writing: class C(B): def meth(self, arg): super(type(self), self).meth

Re: can't get cgi values

2006-11-27 Thread Paul McGuire
form("citation").value Is form some form of dict? If so, then this should be something like: form["citation"] If not, then maybe value is a function, requiring ()'s to actually invoke it. -- Paul -- http://mail.python.org/mailman/listinfo/python-list

Re: can't get cgi values

2006-11-27 Thread Fredrik Lundh
ronrsr wrote: > I'm having trouble extracting cgi parameters in my code - this is a web > application, so I only know the line that's causing the problem. seen this: http://docs.python.org/lib/module-cgitb.html ? > temp = str(form("citation").value) did you perhaps mean form["citati

can't get cgi values

2006-11-27 Thread ronrsr
I'm having trouble extracting cgi parameters in my code - this is a web application, so I only know the line that's causing the problem. here's the info I know: form = FieldStorage(None, None, [MiniFieldStorage('zid', '17'), MiniFieldStorage('keywords', 'aAUA'), MiniFieldStorage('keywords', 'aBOS

python skipping lines?

2006-11-27 Thread lisa . engblom
Hi, I've just started programming in python, and have run into an unexpected problem. I am using python to pull text data from some csv files. I have one file that has the important identifiers (name, etc) and other files with lots of other data. I wrote a function that takes the file name and

Re: Calling a thread asynchronously with a callback

2006-11-27 Thread Bjoern Schliessmann
Edwin Gomez wrote: > I'm a C# developer and I'm new to Python. I would like to know if > the concept of Asynchronous call-backs exists in Python. Sure. Either with this: http://twistedmatrix.com/projects/core/documentation/howto/async.html Or manually using select(). > Basically what I mean i

Re: Calling a thread asynchronously with a callback

2006-11-27 Thread Diez B. Roggisch
Edwin Gomez wrote: > I'm a C# developer and I'm new to Python. I would like to know if the > concept of Asynchronous call-backs exists in Python. Basically what I > mean is that I dispatch a thread and when the thread completes it invokes > a method from the calling thread. Sort event driven co

Re: working with files and directories

2006-11-27 Thread halex2000
"Duncan Booth" <[EMAIL PROTECTED]> ha scritto nel messaggio news:[EMAIL PROTECTED] > "halex2000" <[EMAIL PROTECTED]> wrote: >> "Thomas Ploch" <[EMAIL PROTECTED]> ha scritto nel messaggio >> news:[EMAIL PROTECTED] >>> Have you actually even tried to find some "documentation"? >>> Have you placed a

Re: Active State and Komodo...

2006-11-27 Thread Trent Mick
Steve Thompson wrote: > Hello all, > > I was wondering the differnced there were betwee Active State's python and > the open source version of python. Here is the best answer to that: http://groups.google.com/group/comp.lang.python/tree/browse_frm/thread/e8291fcb1418e80/16f39060f654402f?rnum=1&h

Calling a thread asynchronously with a callback

2006-11-27 Thread Edwin Gomez
I'm a C# developer and I'm new to Python. I would like to know if the concept of Asynchronous call-backs exists in Python. Basically what I mean is that I dispatch a thread and when the thread completes it invokes a method from the calling thread. Sort event driven concept with threads. Tha

shtoom complicated install

2006-11-27 Thread Croteam
Hello, I have install problem about shtoom.How to I Install shtoom correct,when I install shtoom with setup.py (shtoom package setup file), it just make some directory (shtoom-0.2) and 3 python files with them.But just tell me this,when I was manual make folder by name "shtoom" (as write in shtoom

Re: Several entries on Tile and TableList at the Tkinter wiki

2006-11-27 Thread jim-on-linux
Thanks for posting this entry, The fact that a wiki or help site doesn't get a lot of traffic is not an necessarily an indicator of it's usfulness. It indicates to me that the product, in this case Tkinter, may be easy to use and understand, after working with it a little, A lot of help may

Dr. Dobb's Python-URL! - weekly Python news and links (Nov 27)

2006-11-27 Thread Paul Boddie
QOTW: "Given these criteria, my recommendations for a first programming language would be Python or Scheme." - Peter Norvig (some time ago, but referenced on comp.lang.lisp this week) http://www.norvig.com/21-days.html "however if you want more visual effect with less hassle, consider learnin

Re: Python v PHP: fair comparison?

2006-11-27 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, I reported: . . . >I appreciate your clarification. I can report back that we >certainly move in different circles; I, for example, knew of >people with multi-million-dollar budgets deciding on

Is PyGTK only for local - not web?

2006-11-27 Thread walterbyrd
I have noticed that there is also pygtk-web project, I suppose that is what you use for the web? -- http://mail.python.org/mailman/listinfo/python-list

Re: Persistent Threads & Synchronisation

2006-11-27 Thread Paul McGuire
"Matthew Tylee Atkinson" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >I appear to be having some problems with the isAlive() method of > detecting if a thread is alive/active/running or not. I'd be grateful > for any advice. > Your comments about restartable threads got me thinkin

Re: Inheritance from builtin list and override of methods.

2006-11-27 Thread Carl Banks
Fredrik Lundh wrote: > Michalis Giannakidis wrote: > > > Could someone please explain the reasoning/behabiour of these? > > in general, methods on C objects are implemented in terms of operations > on the internal data structures, not in terms of a subset of the methods > already provided by the ob

Re: About alternatives to Matlab

2006-11-27 Thread Rob Purser
Hi all, I'm not going to touch the big picture issues here -- you need to pick the right tool for the job you're doing, and only you know what works best for your task. However, since it didn't come up, I feel I need to add a piece of info to the mix, since I spend my days getting MATLAB worki

Re: Inheritance from builtin list and override of methods.

2006-11-27 Thread Fredrik Lundh
Michalis Giannakidis wrote: >> "obj[index] = value" maps to "obj.__setitem__(index, value)". reading >> the documentation might help; start here: >> >> http://docs.python.org/ref/specialnames.html > > In this documentation page it also says: > --snip--- > then x[i] is equivalent3.2 to x.__g

Re: Inheritance from builtin list and override of methods.

2006-11-27 Thread Duncan Booth
Michalis Giannakidis <[EMAIL PROTECTED]> wrote: > On Monday 27 November 2006 11:50, Fredrik Lundh wrote: > >> "obj[index] = value" maps to "obj.__setitem__(index, value)". >> reading the documentation might help; start here: >> >> http://docs.python.org/ref/specialnames.html > > In this do

Re: Inheritance from builtin list and override of methods.

2006-11-27 Thread Michalis Giannakidis
On Monday 27 November 2006 11:50, Fredrik Lundh wrote: > "obj[index] = value" maps to "obj.__setitem__(index, value)". reading > the documentation might help; start here: > > http://docs.python.org/ref/specialnames.html In this documentation page it also says: --snip--- then x[i] is equival

Re: How good is CORBA?

2006-11-27 Thread Chris Mellon
On 11/24/06, Piet van Oostrum <[EMAIL PROTECTED]> wrote: > > "Chris Mellon" <[EMAIL PROTECTED]> (CM) wrote: > > >CM> FYI: Ice is available under the GPL, so if by "pay" you mean "pay > >CM> money" that's not your only option. You can also get a commercial > >CM> license, similiar to Qt. > > >CM

Re: working with files and directories

2006-11-27 Thread Duncan Booth
"halex2000" <[EMAIL PROTECTED]> wrote: > "Thomas Ploch" <[EMAIL PROTECTED]> ha scritto nel messaggio > news:[EMAIL PROTECTED] >> Have you actually even tried to find some "documentation"? >> Have you placed a google search "python directories rename files"? >> Thomas > > Actually I did it on the

Re: working with files and directories

2006-11-27 Thread halex2000
"Bryan Olson" <[EMAIL PROTECTED]> ha scritto nel messaggio news:[EMAIL PROTECTED] > halex2000 wrote: >> Hi all, I'm new with Python, and I thought to use it to automatically >> rename some files in a directory, but I don't know where should I search >> the functions: to get all the files of a d

Re: working with files and directories

2006-11-27 Thread halex2000
"Thomas Ploch" <[EMAIL PROTECTED]> ha scritto nel messaggio news:[EMAIL PROTECTED] > Have you actually even tried to find some "documentation"? > Have you placed a google search "python directories rename files"? > Thomas Actually I did it on the documentation file provided with the windows dis

Re: working with files and directories

2006-11-27 Thread Bryan Olson
halex2000 wrote: > Hi all, I'm new with Python, and I thought to use it to automatically rename > some files in a directory, but I don't know where should I search the > functions: to get all the files of a directory, to rename the files and so > on. Python programmers are constantly looking at

Re: working with files and directories

2006-11-27 Thread Thomas Ploch
halex2000 schrieb: > Hi all, I'm new with Python, and I thought to use it to automatically rename > some files in a directory, but I don't know where should I search the > functions: to get all the files of a directory, to rename the files and so > on. > Thank you. > > Have you actually even

Re: working with files and directories

2006-11-27 Thread Fredrik Lundh
"halex2000" wrote: > Hi all, I'm new with Python, and I thought to use it to automatically rename > some files in a > directory, but I don't know where should I search the functions: to get all > the files of a > directory, to rename the files and so on. see http://effbot.org/pyfaq/how-d

working with files and directories

2006-11-27 Thread halex2000
Hi all, I'm new with Python, and I thought to use it to automatically rename some files in a directory, but I don't know where should I search the functions: to get all the files of a directory, to rename the files and so on. Thank you. -- http://mail.python.org/mailman/listinfo/python-list

Re: Ruby/Python/REXX as a MUCK scripting language

2006-11-27 Thread Laurent Pointal
Fred Bayer a écrit : > > Tony Belding wrote: >> I'm interested in using an off-the-shelf interpreted language as a >> user-accessible scripting language for a MUCK. I'm just not sure if I >> can find one that does everything I need. The MUCK must be able to >> call the interpreter and execute sc

Re: The Python Papers Edition One

2006-11-27 Thread Alan J. Salmoni
I heartily agree. pdf format has never been much of a problem for me. Now that you have an ISSN, has it been submitted to Google Scholar or other academic indexes? http://scholar.google.com/intl/en/scholar/about.html for Google Scholar http://citeseer.ist.psu.edu/submitDocument.html for Citeseer

Re: Persistent Threads & Synchronisation

2006-11-27 Thread Matthew Tylee Atkinson
On Sun, 26 Nov 2006 19:38:20 +, Dennis Lee Bieber wrote: > Methods defined in a thread class but called from outside the > running thread run in the environment of the caller, not as part of the > thread (and if the method manipulates state you may run into conflicts). Thanks very much;

silent error in email module

2006-11-27 Thread rb . online
Hi all, I rencently had trouble finding a bug in an email processing script because of an error that pass silently in the email module. The get_payload() method in the email.message module always return something when the decode argument is set to True. This behaviour is well documented, but is th

Re: --enable-shared, how do i set the rpath?

2006-11-27 Thread Robert Kern
Mark Harrison wrote: > I've built a python with --enable-shared in order to support mod_python, > but now I have to set LD_LIBRARY_PATH to $prefix/lib. > > Worse, it seems mod_python will die on some import statements, > I'm suspecting ones that need to pull in .so's. I find that most of my Apac

A Call for Community Input re PyCon Slogans/Swag

2006-11-27 Thread Jeff Rush
The PyCon organizers have established a short online poll to collect input from the Python community regarding the shirts, tote bag and slogans to be used at PyCon 2007, being held in Addison (Dallas), Texas Feb 23-25 2007. When we put out a prior call for slogan suggestions, we received 104 su

Re: Inheritance from builtin list and override of methods.

2006-11-27 Thread Fredrik Lundh
Michalis Giannakidis wrote: >> in general, methods on C objects are implemented in terms of operations >> on the internal data structures, not in terms of a subset of the methods >> already provided by the object. > > But what is the reason that the assignment > l[2] = 6 > call my function, but

Re: Generator question

2006-11-27 Thread Peter Otten
Mathias Panzenboeck wrote: > Robert Kern wrote: >> Timothy Wu wrote: >>> Hi, >>> >>> Using generator recursively is not doing what I expect: >>> >>> def test_gen(x): >>> yield x >>> x = x - 1 >>> if x != 0: >>> test_gen(x) >> >> The only thing that the last line does is *creat

Re: synching with os.walk()

2006-11-27 Thread [EMAIL PROTECTED]
On Nov 24, 7:57 am, "Andre Meyer" <[EMAIL PROTECTED]> wrote: > > os.walk() is a nice generator for performing actions on all files in a > directory and subdirectories. However, how can one use os.walk() for walking > through two hierarchies at once? I want to synchronise two directories (just > b

Announcing: Keynote Speakers for PyCon 2007

2006-11-27 Thread Jeff Rush
The PyCon organizers would like to announce the slate of keynote speakers who have accepted our invitation to speak at PyCon 2007! PyCon 2007 is taking place in Addison (Dallas), Texas on Feb 23-25 2007. For photos, biographies and more, check out: http://us.pycon.org/TX2007/Keynotes Ivan

Re: Inheritance from builtin list and override of methods.

2006-11-27 Thread Michalis Giannakidis
> in general, methods on C objects are implemented in terms of operations > on the internal data structures, not in terms of a subset of the methods > already provided by the object. But what is the reason that the assignment l[2] = 6 call my function, but l.append(3) doesn't ? Also, why can'

Re: reading id3 tags with python

2006-11-27 Thread LaundroMat
On Nov 24, 5:42 pm, "jeff" <[EMAIL PROTECTED]> wrote: [snip] > and what do you mean by 'id3reader' cant do directories? > my for loop just does each file in the dirextory It's just a friendly warning that you shouldn't suppose that all that is scanned are indeed files, and not directories. -- ht

  1   2   >