From: gmcm at hypernet.com (Gordon McMillan)
Date: Wed, 7 Apr 1999 02:51:56 GMT
Subject: Writing lines longer than 80 charc !
In-Reply-To: <e6iPAsIg#GA.226@upnetnews03>
References: <e6iPAsIg#GA.226@upnetnews03>
Message-ID: <1288668783-75154173@hypernet.com>
X-UID: 499                                                  

Sunit asks:

> I'm wondering if someone knew of a way of writing a line of more
> than 80 characters to a file in way that it won't split it into two
> lines.

That's an artifact of the way you're viewing it. None of the ways of 
writing characters to a file do anything special at 80 characters.

>>> open('test.txt','w').write('a'*1024)
>>> txt = open('test.txt', 'r').read()
>>> len(txt)
1024
>>> txt == 'a'*1024
1

See? Nothing but 'a's.

- Gordon




