A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2002-March/021108.html below:

[Python-Dev] Next version of PEP278 - universal newline support

[Python-Dev] Next version of PEP278 - universal newline support - availablePaul Svensson paul@svensson.org
Thu, 14 Mar 2002 09:12:40 -0500 (EST)
On Thu, 14 Mar 2002, Fredrik Lundh wrote:

>on a Unix box, does the following piece of code
>open a text file or a binary data file?
>
>    f = open(filename)

According to `man fopen` on Rock Linux 3.0.9, "r" is used for opening a text
file for reading, and "b" can be added, but has no effect.  So it appears
that at least on this variant of Unix, stdio can not read binary files... 

On the other hand, ANSI C specifies that "b" should be used when opening
binary files, so I suppose there would be some flags to the compiler to
make that work (gcc 2.95.2)...

Btw, does compiling Python require ANSI C, or does it work with an old K&R
style compiler as well ?  I'd love to have Python on my ITS box ;)

sidetracked-and-forgot-to-answer-the-question-ly,

	/Paul




RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4