Re: [Tutor] question about looping.

2006-10-08 Thread Hugo González Monteverde
Doug Potter wrote: > for i in routers: > os.system('/bin/touch' %s) % i > > of course this dosn't work. > > Is there a simple way to get this done? Yep, someone already answered that you can create the file in write mode and then close it, but I wanted to add a little more in why your sol

Re: [Tutor] question about looping.

2006-10-06 Thread Carlos Hanson
Doug Potter wrote: > Hi, > > I at trying to create a bunch of text files in a single directory on a > Linux system, > something like this. > > import os > > routers = ['adnc-6321', 'adnp-2341', 'adnw-2632'] > > for i in routers: > os.system('/bin/touch' %s) % i > > of course this dosn't w

Re: [Tutor] question about looping.

2006-10-06 Thread Kent Johnson
Doug Potter wrote: > Hi, > > I at trying to create a bunch of text files in a single directory on a > Linux system, > something like this. > > import os > > routers = ['adnc-6321', 'adnp-2341', 'adnw-2632'] > > for i in routers: > os.system('/bin/touch' %s) % i I think you're close, just