diff options
author | Inada Naoki <songofacandy@gmail.com> | 2019-04-01 09:35:20 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-01 09:35:20 (GMT) |
commit | 10654c19b5e6efdf3c529ff9bf7bcab89bdca1c1 (patch) | |
tree | ca75a763dce4e28e32ea396acb12665f6cf2cfe5 /Doc | |
parent | 62f9588663ebfea1735e9d142ef527395a6c2b95 (diff) | |
download | cpython-10654c19b5e6efdf3c529ff9bf7bcab89bdca1c1.zip cpython-10654c19b5e6efdf3c529ff9bf7bcab89bdca1c1.tar.gz cpython-10654c19b5e6efdf3c529ff9bf7bcab89bdca1c1.tar.bz2 |
bpo-20844: open script file with "rb" mode (GH-12616)
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/c-api/veryhigh.rst | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Doc/c-api/veryhigh.rst b/Doc/c-api/veryhigh.rst index c891f63..317093e 100644 --- a/Doc/c-api/veryhigh.rst +++ b/Doc/c-api/veryhigh.rst @@ -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) |