Re: Naming a file

2008-01-19 Thread Diez B. Roggisch
Matthias Bläsing schrieb: > Am Sat, 19 Jan 2008 14:14:30 -0800 schrieb snoylr: > >> For example if the variable is 105Markum >> >> What statement do I need to create a file name 105Markum.txt? > > filename_base = '105Markum' > filename = '%s.txt' % filename_base > f = open(filename, 'w') > f.writ

Re: Naming a file

2008-01-19 Thread Matthias Bläsing
Am Sat, 19 Jan 2008 14:14:30 -0800 schrieb snoylr: > For example if the variable is 105Markum > > What statement do I need to create a file name 105Markum.txt? filename_base = '105Markum' filename = '%s.txt' % filename_base f = open(filename, 'w') f.write(http://mail.python.org/mailman/listinfo/

Naming a file

2008-01-19 Thread snoylr
I have a variable called filename How do I create a file using the filename variable as the name of the file? For example if the variable is 105Markum What statement do I need to create a file name 105Markum.txt? -- http://mail.python.org/mailman/listinfo/python-list