![](/img/trans.png)
[英]PyCharm Unix-like Shell, but Python from Windows, not Cygwin
[英]Run Python Shell from Windows CMD (bypass cygwin)
我在win 7 pc上安装了cygwin。 当我运行python shell时,我得到操作系统名称为posix(这是预期的),许多DOS命令不能使用os.system("DOS command")
。
有没有办法可以避免从Windows命令提示符进入posix shell?
您需要运行本机Windows Python解释器而不是Cygwin端口。
假设您已经在系统上安装了两者,请检查PATH设置以确认首先是本机Windows版本。
如果这对您不起作用,并且您将运行Cygwin端口,那么您将不得不避免使用os.system()调用,而是切换到使用新的子进程包。 阅读http://docs.python.org/library/subprocess.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.