mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +00:00
bpo-20844: open script file with "rb" mode (GH-12616)
This commit is contained in:
parent
62f9588663
commit
10654c19b5
4 changed files with 24 additions and 1 deletions
|
|
@ -109,6 +109,10 @@ the same library that the Python runtime is using.
|
|||
(:func:`sys.getfilesystemencoding`). If *closeit* is true, the file is
|
||||
closed before PyRun_SimpleFileExFlags returns.
|
||||
|
||||
.. note::
|
||||
On Windows, *fp* should be opened as binary mode (e.g. ``fopen(filename, "rb")``.
|
||||
Otherwise, Python may not handle script file with LF line ending correctly.
|
||||
|
||||
|
||||
.. c:function:: int PyRun_InteractiveOne(FILE *fp, const char *filename)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue