0x1A is Ctrl-Z, and DOS historically used that as an end-of-file marker. For example, try using a command prompt, and “type”ing your file. It will only display the content up the Ctrl-Z.
Python uses the Windows CRT function _wfopen, which implements the “Ctrl-Z is EOF” semantics.
More Related Contents:
- “python” not recognized as a command
- Python Ctypes – loading dll throws OSError: [WinError 193] %1 is not a valid Win32 application
- How to execute Python scripts in Windows?
- Windows cmd encoding change causes Python crash
- Getting MAC Address
- Windows is not passing command line arguments to Python programs executed from the shell
- Python pysftp get_r from Linux works fine on Linux but not on Windows
- Which is the easiest way to simulate keyboard and mouse on Python?
- Is there a way to list all the available Windows’ drives?
- fcntl substitute on Windows
- Python Window Activation
- Python command not working in command prompt
- Using Python, how can I access a shared folder on windows network?
- python ctypes issue on different OSes
- Popen with conflicting executable/path
- Accessing CPU temperature in python
- Python running as Windows Service: OSError: [WinError 6] The handle is invalid
- tkinter.TclError: image “pyimage3” doesn’t exist
- How do I install SciPy on 64 bit Windows?
- pyclipper installation error: “tp_print is not a member of _typeobject”
- Python raw strings and trailing backslash [duplicate]
- IOError: [Errno 13] Permission denied when trying to open hidden file in “w” mode
- How do I read text from the Windows clipboard in Python?
- Making Python scripts run on Windows without specifying “.py” extension
- Why python executable opens new window instance when function by multiprocessing module is called on windows
- Error: No module named ‘fcntl’
- ‘pip setup.py bdist_wheel’ no longer builds forced non-pure wheels
- Add “django-admin.py” path to command line on Windows 7
- multiprocessing: How can I ʀᴇʟɪᴀʙʟʏ redirect stdout from a child process?
- Python file.write creating extra carriage return