homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eryksun
Recipients Alex.Grinko, eryksun
Date 2014年03月30日.21:26:32
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1396214793.2.0.220048431771.issue21104@psf.upfronthosting.co.za>
In-reply-to
Content
AFAIK, this doesn't affect Python 3 under normal circumstances. A file could be manually set to text mode by calling msvcrt.setmode(f.fileno(), os.O_TEXT), but that's out of the norm.
In Python 2, on Windows interpreting ctrl+z (0x1a) as end-of-file is normal behavior in text mode. Read the remarks about [t]ext mode in the description of Microsoft's fopen implementation:
http://msdn.microsoft.com/en-us/library/yeby3zcb%28v=vs.90%29.aspx
If you use Python's universal newlines mode, e.g. open('sample.txt', 'rU'), then the underlying file is opened in binary mode and therefore will not interpret ctrl+z as the end-of-file marker.
History
Date User Action Args
2014年03月30日 21:26:33eryksunsetrecipients: + eryksun, Alex.Grinko
2014年03月30日 21:26:33eryksunsetmessageid: <1396214793.2.0.220048431771.issue21104@psf.upfronthosting.co.za>
2014年03月30日 21:26:33eryksunlinkissue21104 messages
2014年03月30日 21:26:32eryksuncreate

AltStyle によって変換されたページ (->オリジナル) /