Re: How to eliminate quotes around string field written to a file.

2008-11-14 Thread Shawn Milochik
On Sat, Nov 15, 2008 at 12:19 AM, Steven D'Aprano <[EMAIL PROTECTED]> wrote: > On Fri, 14 Nov 2008 20:39:53 -0800, len wrote: > >> hi >> >> Have this code in my program; >> >> filename = 'custfile' >> codeline = filename + ' = [\n' >> output.write(codeline) >> >> record written to file

Re: How to eliminate quotes around string field written to a file.

2008-11-14 Thread Steven D'Aprano
On Fri, 14 Nov 2008 20:39:53 -0800, len wrote: > hi > > Have this code in my program; > > filename = 'custfile' > codeline = filename + ' = [\n' > output.write(codeline) > > record written to file look like this > > "custfile" = [ I cannot reproduce that behaviour. I suggest

Re: How to eliminate quotes around string field written to a file.

2008-11-14 Thread John Machin
On Nov 15, 3:39 pm, len <[EMAIL PROTECTED]> wrote: > hi > > Have this code in my program; > >     filename = 'custfile' >     codeline = filename + ' = [\n' >     output.write(codeline) > > record written to file look like this > >      "custfile" = [ Assuming output is a file object, what you say

How to eliminate quotes around string field written to a file.

2008-11-14 Thread len
hi Have this code in my program; filename = 'custfile' codeline = filename + ' = [\n' output.write(codeline) record written to file look like this "custfile" = [ Yet in another part of the program I have code: def fmtline(fieldline): code = '(' + fieldline[1].re