[英]Launching python3 script using a python2 script
is there a way to launch a script running on python3 via a python2 script.有没有办法通过 python2 脚本启动在 python3 上运行的脚本。
To explain briefly I need to start the python3 script when starting the python2 script.简单解释一下我需要在启动python2脚本的时候启动python3脚本。
Python3 script is a video stream server (using Flask) and have to run simultaneously from the python2 script (not python3 script first and then python2 script). Python3 脚本是一个视频 stream 服务器(使用 Flask),必须同时从 python2 脚本运行(不是先运行 python3 脚本,然后再运行 python2 脚本)。
The ideal would be to get a function in the python2 script which "open a cmd window and write" it in: python3 script_python3.py理想的情况是在 python2 脚本中获取 function ,该脚本“打开 cmd window 并将其写入”:python3 script_python3.py
You could use something like explained in this answer .您可以使用此答案中解释的内容。
That use case of that question is a bit different, but the answer should work.该问题的用例有点不同,但答案应该有效。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.