首页
注册
登录
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请
登录
推荐学习书目
›
Learn Python the Hard Way
Python Sites
›
PyPI
- Python Package Index
›
http://diveintopython.org/toc/index.html
›
Pocoo
值得关注的项目
›
PyPy
›
Celery
›
Jinja2
›
Read the Docs
›
gevent
›
pyenv
›
virtualenv
›
Stackless Python
›
Beautiful Soup
›
结巴中文分词
›
Green Unicorn
›
Sentry
›
Shovel
›
Pyflakes
›
pytest
Python 编程
›
pep8 Checker
Styles
›
PEP 8
›
Google Python Style Guide
›
Code Style from The Hitchhiker's Guide
V2EX
›
Python
关于 Python 脚本重复执行
Webpir
·
2017-12-14 17:57:42 +08:00
· 3932 次点击
这是一个创建于 2506 天前的主题,其中的信息可能已经有所发展或是发生改变。
一个小问题。用 pyinstaller 打包成 EXE 之后。是可以重复执行的,多次执行后会出现很多窗口。
怎样才能让这个 EXE 只能同时打开一次?
是通过控制进程吗?有没有其他更有效的办法?
exe
执行
重复
Python
2 条回复
•
2017-12-15 19:25:51 +08:00
1
Aliencn
2017-12-15 13:11:04 +08:00
我一般最懒的方法是程序启动后先占用一个端口。
有时候也会用生成 pid 文件的方法
2
qile1
2017-12-15 19:25:51 +08:00 via Android
我是把 pid 写配置文件,在启动时候读取 pid 结束程序在启动,现在在想如何在程序启动后,通过啥方式让别程序调用 exe 后传参进来!
关于
·
帮助文档
·
博客
·
API
·
FAQ
·
实用小工具
·
3035 人在线
最高记录 6679
·
Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 21ms ·
UTC 13:31
·
PVG 21:31
·
LAX 06:31
·
JFK 09:31
Developed with
CodeLauncher
♥ Do have faith in what you're doing.