[Tutor] Printing to file on one line

Peter Brown peterabrown at froggy.com.au
Tue Sep 23 00:47:49 EDT 2003


Could anyone pls help with my problem?

Peter

At 22:46 22/09/2003 +1000, I wrote:
>Hi,
>
>This is a portion of my program:
>
> #print header for debits in debits file
>
>aba.write('0' + (' ' * 17) + string.zfill(d_batch, 2) + 'MET' + (' ' *
>7) + conf_name.ljust(26) + conf_apca[:6] + conf_desc.ljust(12) +
>str(smdate) + '\r\n')
>a = '1' + a8f + a9f + ' ' + a3 + a4f + a5f + a6f + a1f + a2f + a10 +
>'00000000\r\n' 
> aba.write(a)
>The first write goes over two lines - I want it all on one line:
>
>0                 32MET       PB Exports                 233381Payments 
>  220903^M
>
>The second works as expected.
>
>How do I get the first aba.write to be all on one line?
>
>Peter
>
>
>_______________________________________________
>Tutor maillist  -  Tutor at python.org
>http://mail.python.org/mailman/listinfo/tutor
>
>




More information about the Tutor mailing list