Re: Converting argv to variable

2006-07-22 Thread Terry Reedy
"tgiles" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > (now that I've posted in the wrong flipping newsgroup the first thing, > here's my question to the lovely python folks) > > I've taken a year off (or so) using Python and the first thing I run > into utterly stumped me. Been t

Re: Converting argv to variable

2006-07-22 Thread Klaus Alexander Seistrup
Tom skrev: > newDirectory = str(sys.argv[1:]) Try newDir = '/'.join(sys.argv[1:]) or newDir = sys.argv[1] or for newDir in sys.argv[1:]: : or something along those lines, depending on how you wish to interpret the commandline. Cheers, -- Klaus Alexander

Re: Converting argv to variable

2006-07-22 Thread Tim Chase
> newDirectory = str(sys.argv[1:]) [cut] > Now, in a perfect universe I would get an output something > like the following (if I run the script with the argument > 'python': > > /Volumes/Home/myuser/python > > However, Python still hangs on to all the fluff and prints > out something else: