Uwe: I think that is what I am looking for. Converting my list to a
string doesn't seem to treat the contents of the string the way I would
expect. There are 16 fields in each records and besides I can save a
step with your approach below. I will try it.
Thanks,
Jeff
Jeff Johnson
[EMAIL PROTECTED]
SanDC, Inc.
623-582-0323
Fax 623-869-0675
Uwe Grauer wrote:
> Jeff Johnson wrote:
>> Uwe: That is what I was expecting, but I do not get that.
>>
>> I am writing the string to a file. When I view the file I get astr, not
>> the two records separated by the return.
>>
>> f = open('text.txt', 'w')
>> f.write(astr)
>>
>> yields one string in the file and not two records.
>>
>> Jeff
>>
>
> Maybe you want something like:
>
> alist = ['field1', 'field2', 'field3', 'field4']
> f = open('text.txt', 'w')
> alen = len(alist)
> i = 0
> while(i+2 <= alen):
> f.write("%s %s\n" % (alist[i], alist[i+1]))
> i = i+2
>
>
>
[excessive quoting removed by server]
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/dabo-users/[EMAIL PROTECTED]