我正在尝试使用 pyinstaller 构建 python 应用程序的二进制文件。 我的目标是获得构建时间,所以我尝试了以下选项
-
time pyinstaller --bootloader-ignore-signals --onefile <file> | tee pyinstaller.log
-
time pyinstaller --bootloader-ignore-signals --onefile <file> >> pyinstaller.log
这些都不起作用。有什么想法可以实现我的想法吗?
最佳答案
如果您只需要 pyinstaller 的输出及其执行时间:
(time pyinstaller --bootloader-ignore-signals --onefile script.py) |& tee pyinstaller.log
或者如果你只需要执行时间的结果,使用一些分组来重定向time
的输出:
{ time pyinstaller --bootloader-ignore-signals --onefile script.py 2>&3; } 3>&2 2>pyinstaller.log
关于linux - 管道pyinstaller输出可能吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56714705/