linux - 管道pyinstaller输出可能吗?

标签 linux time

我正在尝试使用 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/

相关文章:

time - Lua - 当前时间(以毫秒为单位)

java - 如何从 TemporalAccessor 获取 ZoneId、LocalDateTime 和 Instant

php - 尝试在 Linux 中通过 PHP 使 apache 运行 Python 时出现权限被拒绝错误

c - 创建4个子进程

linux - vim 查找替换模式匹配反斜杠和字符串

Java : Remove seconds from java. sql.Time 不工作

c++ - 以纳秒为单位获取本地时间

swift - 测量调用方法 "didUpdateValueFor"之间的时间

python - nano如何在ssh上有gui接口(interface)

c - linux模块互函数引用