Re: [Tutor] multiple assignment

2005-10-17 Thread John Fouhy
On 18/10/05, Vincent Gulinao <[EMAIL PROTECTED]> wrote: > I was fascinated when I learned that I can do this in Python: > > (str1, str2, str3, rest) = str.split(" ", 3) > [...] > In essence, I'd like to capture the first 3 words in a string. If str is > less than 3 words then any or all of the co

[Tutor] multiple assignment

2005-10-17 Thread Vincent Gulinao
I was fascinated when I learned that I can do this in Python: (str1, str2, str3, rest) = str.split(" ", 3) Later that I realize that str could contain values of less than 4 strings, in which case it would complain something like -- ValueError: unpack list of wrong size. Now I don't want to

Re: [Tutor] IDLE will not appear under Win95 (Python 2.4.2) (fwd)

2005-10-17 Thread paul brian
I would suggest that you use "add Remove Programs" in the control panel and remove the python and win32 installations that you have installed Then visit www.activestate.com and download the package for activePython (http://activestate.com/Products/Download/Download.plex?id=ActivePython) You may

Re: [Tutor] IDLE will not appear under Win95 (Python 2.4.2) (fwd)

2005-10-17 Thread w chun
dave, you should be able to start PythonWin in one of 2 ways: 1) Start menu -> Programs -> Python 2.4 -> PythonWin or 2) C:\Python24\Lib\site-packages\pythonwin\Pythonwin.exe hope this helps! -- wesley - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "Core Python Programming", Pre

Re: [Tutor] IDLE will not appear under Win95 (Python 2.4.2) (fwd)

2005-10-17 Thread Danny Yoo
[Keeping tutor in CC] -- Forwarded message -- Date: Mon, 17 Oct 2005 22:03:22 +1300 From: Dave Shea <[EMAIL PROTECTED]> To: Danny Yoo <[EMAIL PROTECTED]> Subject: Re: [Tutor] IDLE will not appear under Win95 (Python 2.4.2) Hi Danny, Thanks for your note. I tried your original sug

Re: [Tutor] hand-holding for web development

2005-10-17 Thread Jay Loden
You need an Apache config section to tell it what to use mod_python on and how. For example, in httpd.conf or a separate file in your conf.d directory for apache: AddHandler mod_python .py PythonHandler test PythonDebug On tells Apache to use mod_python on all .py f

Re: [Tutor] IDLE will not appear under Win95 (Python 2.4.2)

2005-10-17 Thread w chun
On 10/16/05, Danny Yoo <[EMAIL PROTECTED]> wrote: On Sat, 15 Oct 2005, Dave Shea wrote:> Python installed without a complaint. However, when I fire up IDLE,> there is an hour glass shown for a couple of seconds, then nothing else> happens. When I fire up Python (command line) no problem, the DOS bo

[Tutor] Please excuse the previous message sent in error

2005-10-17 Thread Luke Jordan
Sincerely, Luke ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] Assign to vars by iteration

2005-10-17 Thread Luke Jordan
I've got a bunch of pickled class instances, and I'm trying to load them as variables using a function. The class has a self.name attribute, and I've got a list of self.name for all the instances pickled separately. When I would like to attach the names of each instance to the corresponding class

Re: [Tutor] os.listdir blocks threads?

2005-10-17 Thread Hugo González Monteverde
Hi, I wrote a quick module for spawning a subprocess and run the function, just as an excercise, after I read your post... It will spawn a subprocess, then pass the serialized return values to the parent. So, if you want to do: lala = os.listdir(".") you do lala = fmg(os.listdir, ".") This w

[Tutor] extentions and osX

2005-10-17 Thread Tom Beale
I have a problem with a c++ extension into a python program. I am trying to run a program written by someone else. It has been written and tested on linux/intel but I don't have access to a linux machine at the moment, so I am attempting to run it on osX (G4). When the program runs I get a

[Tutor] functions

2005-10-17 Thread Norman Silverstone
I am greatly impressed by the most useful instruction I have received since I raised my need for help on this subject. The more I read the more things fall into place. My grateful thanks to one and all and please keep the good stuff flowing. Norman ___