Re: [Tutor] Newbie to Python

2007-12-09 Thread Alan Gauld
Hi Fred, welcome to the list > I would like to provide the script the path and filename of a file. OK, Look at sys.argv for command line argument passing Look at raw_input() for interactive prompting > Then the script would create a series of required directories > then copy the contents of the

Re: [Tutor] logic for a tree like structure

2007-12-09 Thread Tiago Saboga
On Sat, Dec 08, 2007 at 04:13:19PM -0800, Jeff Younker wrote: > Pipes and IO channels are buffered. The buffers are much larger than > the amount of information you are writing to them, so they're never getting > flushed while the program is running. The child program completes, the > IO channe

Re: [Tutor] Timed While Loops and Threads

2007-12-09 Thread bhaaluu
On Dec 8, 2007 11:11 PM, Michael H. Goldwasser <[EMAIL PROTECTED]> wrote: > > Hi everyone, > > I'm having some fun combining two recent topics: the "Timed While > Loops" game and that of communication between threads. Here is an > example that allows a person to gather points in a while loop, but

[Tutor] Noob question

2007-12-09 Thread quantrum75
Hi there, I am a newbie trying to actively learn python. My question is, Suppose I have a list a=["apple","orange","banana"] How do I convert this list into a string which is b="appleorangebanana" Sorry for my ignorance, but I have been trying a "for" loop and trying the inbuilt str.join() metho

Re: [Tutor] Noob question

2007-12-09 Thread Eric Brunson
quantrum75 wrote: > Hi there, > I am a newbie trying to actively learn python. > My question is, > Suppose I have a list > a=["apple","orange","banana"] > > How do I convert this list into a string which is > > b="appleorangebanana" > Sorry for my ignorance, No worries, every new language has its

Re: [Tutor] Noob question

2007-12-09 Thread Eric Walstad
Eric Brunson wrote: > quantrum75 wrote: >> Hi there, >> I am a newbie trying to actively learn python. >> My question is, >> Suppose I have a list >> a=["apple","orange","banana"] >> >> How do I convert this list into a string which is >> >> b="appleorangebanana" >> Sorry for my ignorance, > > No

Re: [Tutor] Noob question

2007-12-09 Thread Alan Gauld
"Eric Walstad" <[EMAIL PROTECTED]> wrote > You could also achieve the same result of concatenating a list of > strings by looping over the list items like so: > > b = '' > for fruit in a: >b += fruit > > print b And to add to the options you could use the formatting operator provided you k

[Tutor] A couple of modules

2007-12-09 Thread Ricardo Aráoz
Hi, somebody did ask about dates. Found this package, might be usefull http://labix.org/python-dateutil """ The dateutil module provides powerful extensions to the standard datetime module, available in Python 2.3+. Features * Computing of relative deltas (next month, next year, next monday,