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/2000-May/004289.html below:

[Python-Dev] py_compile and CR in source files

[Python-Dev] py_compile and CR in source filesGreg Ward gward@mems-exchange.org
Fri, 26 May 2000 10:30:15 -0400
Just made an unpleasant discovery: if a Python source file has CR-LF
line-endings, you can import it just fine under Unix.  But attempting to
'py_compile.compile()' it fails with a SyntaxError at the first
line-ending.

Arrghh!  This means that Distutils will either have to check/convert
line-endings at build-time (hey, finally, a good excuse for the
"build_py" command), or implicitly compile modules by importing them
(instead of using 'py_compile.compile()').

Perhaps I should "build" modules by line-at-a-time copying -- currently
it copies them in 16k chunks, which would make it hard to fix line
endings.  Hmmm.

        Greg



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