从 Powershell 启动 Python [英] Launch Python from Powershell
问题描述
这是一个菜鸟问题,但我似乎无法弄清楚.当我尝试从 PowerShell 启动 Python 时,它在 PowerShell 中运行.如何从 Powershell 启动 Python 并让它在新窗口中运行?
This is a noob question but I can't seem to figure out. When I try to launch Python from PowerShell, it runs in PowerShell. How do I launch Python from Powershell and have it run in a new window?
(例如,如果我输入记事本"并按回车键,记事本会在新窗口中弹出.)
(For instance, if i type "Notepad" and hit enter then Notepad pops up in a new window.)
所以我启动 PowerShell 然后输入 PS C:\Users\Michael>Python
.这会在 Powershell 中打开它,但如何在新窗口中打开它?
So I launch PowerShell and then enter PS C:\Users\Michael> Python
. This opens it up in Powershell, but how do I open it up in a new window?
如果之前有人问过这个问题,我们深表歉意.我搜索了论坛,但没有找到任何东西.
Apologies if this question has been asked before. I searched through the forum but didn't find anything.
推荐答案
做 -
Invoke-Item /path/to/python.exe
您需要在那里提供完整路径.例如,在我的情况下是 -
You will need to give the full path there. Exanple , in my case it is -
Invoke-Item C:\Python34\python.exe
这篇关于从 Powershell 启动 Python的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!