Home  >  Article  >  Backend Development  >  解决windows下Sublime Text 2 运行 PyQt 不显示的方法分享

解决windows下Sublime Text 2 运行 PyQt 不显示的方法分享

WBOY
WBOYOriginal
2016-06-16 08:43:421084browse

解决方案

搜了一下,找到一个 Linux 下的解决方案,如下所示:

复制代码 代码如下:

Sublime Text2 运行pySide/pyQt程序的问题
Ctrl-B后,界面不会弹出来,但是后台进程里面有"python.exe",而且使用print能打印出东西来.
解决方法:
打开$sublimeText_dir/Data/Packages/Python/Python.sublime-build
增加 "shell": "true",

按图索骥,打开 C:\Program Files\Sublime Text 2 目录,没有找到 Data 目录,也没有 Packages 目录,猜测应该是放在用户目录下,找找找,在

C:\Users\我的用户名\AppData\Roaming
目录下发现

Sublime Text 2\Packages\Python
目录,果断编辑 Python.sublime-build 内容:

{
  "cmd": ["python", "-u", "$file"],
  "file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
  "selector": "source.python",
  "shell": "true"
}

搞定!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn