简体   繁体   English

从Powershell启动Python

[英]Launch Python from Powershell

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. 当我尝试从PowerShell启动Python时,它将在PowerShell中运行。 How do I launch Python from Powershell and have it run in a new window? 如何从Powershell启动Python并使其在新窗口中运行?

(For instance, if i type "Notepad" and hit enter then Notepad pops up in a new window.) (例如,如果我键入“记事本”并按Enter,则记事本会在新窗口中弹出。)

So I launch PowerShell and then enter PS C:\\Users\\Michael> Python . 因此,我启动PowerShell,然后输入PS C:\\Users\\Michael> Python This opens it up in Powershell, but how do I open it up in a new window? 这会在Powershell中打开它,但是如何在新窗口中打开它呢?

Apologies if this question has been asked before. 抱歉,是否曾经有人问过这个问题。 I searched through the forum but didn't find anything. 我搜索了整个论坛,但未找到任何内容。

Do - 做-

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM