Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/366.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Pyinstaller:在Windows上的python 2.7上设置无缓冲的stdio_Python_Python 2.7_Pyinstaller_Stdio - Fatal编程技术网

Pyinstaller:在Windows上的python 2.7上设置无缓冲的stdio

Pyinstaller:在Windows上的python 2.7上设置无缓冲的stdio,python,python-2.7,pyinstaller,stdio,Python,Python 2.7,Pyinstaller,Stdio,我有一个Windows 10 python脚本,通常使用以下命令运行该脚本:- python -u my_python_application.py -u选项用于强制将stdin、stdout和stderr完全禁用。这给了我的应用程序一种即时的感觉,如果没有它,在操作发生后记录数据会有延迟 我现在正试图通过Pyinstaller创建一个可执行文件。到目前为止,一切都按预期进行,我可以生成一个可执行文件,运行时不会出现任何重大问题。但是,生成的可执行文件没有unbuffered stdio选项,

我有一个Windows 10 python脚本,通常使用以下命令运行该脚本:-

python -u my_python_application.py
-u
选项用于强制将stdin、stdout和stderr完全禁用。这给了我的应用程序一种即时的感觉,如果没有它,在操作发生后记录数据会有延迟

我现在正试图通过Pyinstaller创建一个可执行文件。到目前为止,一切都按预期进行,我可以生成一个可执行文件,运行时不会出现任何重大问题。但是,生成的可执行文件没有unbuffered stdio选项,因此我的应用程序不像其非可执行形式那样具有即时/响应性。因此,我的问题是:在使用Pyinstaller时,是否有必要强制stdio完全无缓冲?

我在这里发现了类似的未回复帖子:-

我正在Windows 10计算机上使用Python v2.7.13和Pyinstaller v3.6。

请参阅