Re: FileIO problem

2005-08-24 Thread bruno modulix
Laszlo Zsolt Nagy wrote: > Try this: > > gclas = raw_input("What is the class:") > def Princlas(): >count = 0 >while count != 1000: >count = count + 1 >return "Admin forceclass %s %s " % ( count , gclas ) have you tried your code ? Obviously, no, else you would have seen t

Re: FileIO problem

2005-08-24 Thread Layin'_Low
thnx guys it was late and had just come from a bar and didnt reread the lines. thnx again for the help -- http://mail.python.org/mailman/listinfo/python-list

Re: FileIO problem

2005-08-24 Thread Laszlo Zsolt Nagy
Try this: gclas = raw_input("What is the class:") def Princlas(): count = 0 while count != 1000: count = count + 1 return "Admin forceclass %s %s " % ( count , gclas ) #asks for file name a = raw_input("What is new file name:") out_file = open(a,"w") #this is the input of t

Re: FileIO problem

2005-08-24 Thread Sybren Stuvel
Layin'_Low enlightened us with: > count = 0 > while count != 1000: > count = count + 1 > print "Admin forceclass " , count , gclas I think you want: output = file('out', 'w') gclas = raw_input("What is the class:") for count in range(1000): output.write("Admin forceclass %4i %s\n"