[Tutor] Printing to file on one line

Kirk Bailey idiot1 at netzero.net
Tue Sep 23 11:32:01 EDT 2003


Peter, is this homework?

Peter Brown wrote:

> 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
>>
>>
> 
> 
> 
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor
> 
> 

-- 

-- 

end

Cheers!
         Kirk D Bailey

  +                              think                                +
   http://www.howlermonkey.net  +-----+        http://www.tinylist.org
   http://www.listville.net     | BOX |  http://www.sacredelectron.org
   Thou art free"-ERIS          +-----+     'Got a light?'-Prometheus
  +                              kniht                                +

Fnord.




More information about the Tutor mailing list