[Tutor] How to launch multiple processes from script?

2004-12-12 Thread Mike in Seattle
I'm working my way through the sockets module. To test my simple server and clients, I'd like a way to launch the server and multiple clients from one script or batch file,all running simultaneously. Each server/client should run as it's own process and have a console window. I've briefly played w

Re: [Tutor] Complex roots

2004-12-12 Thread Dick Moores
Hmm, sounds like something to sink my teeth into for a while. Thanks for just enough of a hint as to how to go about it. But on second thought, how about another hint. How are imaginary roots approximated? For each root, do you try to approximate root.real and root.imag simultaneously, or what?

Re: [Tutor] Complex roots

2004-12-12 Thread Tim Peters
[Dick Moores] >>> Actually, I'm trying to write a Python script that computes all 3 >>> roots of a cubic equation. Do you happen to have one tucked >>> away in your store of wisdom and tricks? (One for real coefficients >>> will do). [Tim Peters] >> I don't, no. You can code one for cubics from C

Re: [Tutor] Complex roots

2004-12-12 Thread Dick Moores
Thanks for the sobering advice, and for the two sites I knew nothing about. So there's a SciPy! Dick Tim Peters wrote at 20:37 12/12/2004: > Are these "numerical approximation methods" pythonically possible? Of course, but coding general-purpose root finders-- even if "general" is limited to just

Subject: Re: [Tutor] os.listdir fn

2004-12-12 Thread Nandan
> Message-ID: <[EMAIL PROTECTED]> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > Are you sure this does what you want? You compute 'scripts' and 'filenames' > and throw them away. I > think this function will return the base name of all the files *and folders* > in ./icon.scr

[Tutor] [ANN] RUR: a Python Learning Environment (alpha)

2004-12-12 Thread André Roberge
RUR: a Python Learning Environment is a successor of Karel the Robot, PyRobot and Guido van Robot. Its purpose is to provide an environment for beginners, including children, to learn python. (Note that Guido van Robot still exists and has been upgraded recently.) Source for the program (python fil

Re: [Tutor] OT?: how to google just the 2.4 tutorial?

2004-12-12 Thread Dick Moores
Brian van den Broek wrote at 10:43 12/12/2004: Dick Moores said unto the world upon 2004-12-12 11:53: I know how to limit google search results to a single site, but is it possible to google just one section of a site? I'd like to be able to search just the 2.4 tutorial, http://www.python.org/doc

[Tutor] Re: listing all combinations of elements of a list

2004-12-12 Thread Lee Harr
Is there a module containing a function for listing the unique k-element subsets of an n-item list? I have written some code (right now I only need it for 2 element subsets): Apparently not, but maybe this will help: http://www.google.com/search?q=python+recipe+list+combinations http://aspn.activ

[Tutor] listing all combinations of elements of a list

2004-12-12 Thread Bill Kranec
Is there a module containing a function for listing the unique k-element subsets of an n-item list? I have written some code (right now I only need it for 2 element subsets): def combination(items) list = [] for i in range(0,len(items)): for j in range(0,len(items)): if j >

Re: [Tutor] OT?: how to google just the 2.4 tutorial?

2004-12-12 Thread Brian van den Broek
Dick Moores said unto the world upon 2004-12-12 11:53: I know how to limit google search results to a single site, but is it possible to google just one section of a site? I'd like to be able to search just the 2.4 tutorial, http://www.python.org/doc/2.4/tut/tut.html Possible? And if so, how to?

Re: [Tutor] function that returns a fn

2004-12-12 Thread Alan Gauld
> def getjlistrenderer(opname): > def listrender(): > # use opname, eg ops=getlist(opname) > # or set local fn variable > return renderer; > return listrender; > #?or f=listrender(); return f; > > Is it really as simple as this? Assuming your indentation is actually OK then yes, it is as easy as

Re: [Tutor] Difference between for i in range(len(object)) andfor i in object

2004-12-12 Thread Bob Gailer
At 08:27 AM 12/12/2004, kumar s wrote: Thank you for clearing up some mist here. In fact I was depressed by that e-mail I appreciate Alan's response and yours. I forgot that this was the Tutor list, as I see so many Python e-mails it is easy to get confused. Please resume seeing this list and m

Re: [Tutor] Complex roots

2004-12-12 Thread Alan Gauld
> Are these "numerical approximation methods" pythonically possible? > Yes and that's how they are normally found - not necessarily with Python, but by applying computer simulations of the equations. Generally you calculate values in ever decreasing increments until you get enough accuracy. eg you

[Tutor] OT?: how to google just the 2.4 tutorial?

2004-12-12 Thread Dick Moores
I know how to limit google search results to a single site, but is it possible to google just one section of a site? I'd like to be able to search just the 2.4 tutorial, http://www.python.org/doc/2.4/tut/tut.html Possible? And if so, how to? Thanks, Dick Moores [EMAIL PROTECTED] ___

Re: [Tutor] Difference between for i in range(len(object)) andfor i in object

2004-12-12 Thread kumar s
Thank you for clearing up some mist here. In fact I was depressed by that e-mail because there are not many tutorials that clearly explains the issues that one faces while trying to code in python. Also, due to lack of people who are proficient in python around our univ. campus in baltimore, i am

Re: [Tutor] Complex roots

2004-12-12 Thread Dick Moores
Tim (was: Bill) Peters wrote at 20:45 12/10/2004: [Dick Moores] > Aw, that's just amazing. > I put your function in http://www.rcblue.com/Python/croots.py, That's fine by me -- but I'd appreciate it if you stopped claiming there that my name is Bill . Are you sure? Well, OK. Tim it is. > Actually