如何在没有终端的情况下在Windows中运行py2exe程序?
有人可以向我解释一下如何在 Windows 上没有终端的情况下运行我的 py2exe 程序(一个控制台程序)吗?
我正在尝试制作一个重新调整窗口大小的程序,它应该从窗口启动,所以我希望它隐藏起来但仍在运行......
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
听起来您想要的是将脚本作为 Windows 服务而不是 Windows 程序运行。像本教程这样的内容可能会有所帮助:
http:// islascruz.org/html/index.php?gadget=StaticPage&action=Page&id=6
Sounds like what you want is for your script to run as a Windows Service instead of a Windows program. Something like this tutorial might be helpful:
http://islascruz.org/html/index.php?gadget=StaticPage&action=Page&id=6
使用
setup()
函数,如下所示:setup(windows=['myfile.py'])
请参阅
setup()
的选项列表。Use the
setup()
function like this:setup(windows=['myfile.py'])
See the list of options for
setup()
.不太明白您的要求,但您可以尝试
start /MIN
。在命令行中输入start /?
以查看其帮助页面。Not really understand your requirement, but you can try
start /MIN
. typestart /?
on the command line to see its help page.您是否会考虑将其编译为 EXE(使用 py2exe 或类似文件)并将其添加到启动列表中程序?
Would you consider compiling it into an EXE (using py2exe or some such) and adding it to your list of startup programs?