Enhancement - Is there a preferred way to terminate a subprocess started with sg.execute_command_subprocess()? (add a terminate process call)
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 35/100
- Issue 类型
- 文档
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- python
- 领域
- desktop, documentation
调研方向
首先查看 issue 中提到的 execute_command_subprocess 入口点以及现有的 Call Reference 和 Cookbook 部分。记录终止异步启动的子进程所支持的方式,包括一个简短的使用示例和任何相关的资源注意事项;当指南能够清楚地回答这个问题时,工作就完成了。
由索引模型根据 Issue 内容生成。
描述
Type of Issue (Enhancement, Error, Bug, Question)
Question
Operating System
MacOS, Linux
PySimpleGUI Port (tkinter, Qt, Wx, Web)
tkinter
Versions
Python version (sg.sys.version)
3.10.4
PySimpleGUI Version (sg.__version__)
4.60.4
GUI Version (tkinter (sg.tclversion_detailed), PySide2, WxPython, Remi)
8.6.12
Your Experience In Months or Years (optional)
3 Years Python programming experience
40 Years Programming experience overall
Have used another Python GUI Framework? (tkinter, Qt, etc) (yes/no is fine)
No
Anything else you think would be helpful?
This issue is really a documentation and recommended coding style question_ Perhaps it could be cleared by just by an explicit answer and example in the Call Reference and Cookbook.
Troubleshooting
These items may solve your problem. Please check those you've done by changing - [ ] to - [X]
- Searched main docs for your problem www.PySimpleGUI.org
- Looked for Demo Programs that are similar to your goal. It is recommend you use the Demo Browser! Demos.PySimpleGUI.org
- None of your GUI code was generated by an AI algorithm like GPT
- If not tkinter - looked for Demo Programs for specific port
- For non tkinter - Looked at readme for your specific port if not PySimpleGUI (Qt, WX, Remi)
- Run your program outside of your debugger (from a command line)
- Searched through Issues (open and closed) to see if already reported Issues.PySimpleGUI.org
- Have upgraded to the latest release of PySimpleGUI on PyPI (lastest official version)
- Tried using the PySimpleGUI.py file on GitHub. Your problem may have already been fixed but not released
Detailed Description
Hi Mike! Thank you for all you are doing for PySimpleGUI!!!_
I have a program which starts up several async processes using sg.execute_command_subprocess().
I have a PYsimpleGUI button, and when the user clicks that button, I want to terminate the subprocesses started earlier, which are still running asynchronously.
I looked through the call reference and cookbook but I did not see any corresponding sg.terminate_subprocess() function.
I was wondering if calling terminate on the object like this, rather than using a PySimpleGUI command (that I didn't find) would cause any problems with resource leaks or other problems within the PySimpleGUI object.
Code To Duplicate
Since sg.execute_command_subprocess() returns a popen_object, I can just send the terminate() message to the object like this:
import PySimpleGUI as sg
popen_object = sg.sg.execute_command_subprocess(
return_info = popen_object.terminate()
print(return_info)
Screenshot, Sketch, or Drawing
N/A
Watcha Makin?
I'm writing a program that extracts still images from video streams of multiple camera sources.
- 主要语言
- Python
- 星标
- 13.8k
- 派生
- 1.8k
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
PySimpleGUI/PySimpleGUI 的其他 Issue
-
Bug Done - Install Dev Build (see docs for how) Platform Specific Issue - Linux Port - TK
难度 2/5 1-3 小时 新手友好度 68/100
PySimpleGUI/PySimpleGUI#6904 · 15 条评论 ·
-
Bug Demo Programs Done - Install Dev Build (see docs for how) Interoperability Port - TK workaround available
难度 2/5 1-3 小时 新手友好度 68/100
PySimpleGUI/PySimpleGUI#6900 · 1 条评论 ·
-
Done - Install Dev Build (see docs for how) enhancement
难度 2/5 1-3 小时 新手友好度 62/100
PySimpleGUI/PySimpleGUI#3251 · 12 条评论 ·
-
难度 3/5 1-2 天 新手友好度 74/100
PySimpleGUI/PySimpleGUI#6906 · 1 条评论 · 1 个 reaction ·
-
Bug Done - Install Dev Build (see docs for how) Port - TK
难度 3/5 1-2 天 新手友好度 45/100
PySimpleGUI/PySimpleGUI#6902 · 1 条评论 ·
查看 PySimpleGUI/PySimpleGUI 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 75/100
anthropics/skills#1811 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
speaches-ai/speaches#678 ·
-
bug
难度 2/5 1-3 小时 新手友好度 75/100
datalayer/mcp-compose#42 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
conda-forge/spacy-feedstock#177 ·
-
难度 2/5 1-3 小时 新手友好度 70/100
UKGovernmentBEIS/inspect_evals#2523 ·