崇高的文本不建任何东西 [英] Sublime Text don't build anything

查看:181
本文介绍了崇高的文本不建任何东西的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用崇高的文本2在Ubuntu Linux和工作pretty罚款。

I used Sublime Text 2 in Ubuntu Linux and worked pretty fine.

现在,当我在Windows中使用它,我不能建立任何东西。它出现在底部的状态栏中的建筑,然后什么也不做。我做了一个简单的测试像建设在Python构建系统打印的Hello World,并没有任何反应。

Now, when I use it in Windows, i can't build anything. It appears "building" in the status bar in the bottom and then do nothing. I did a trivial test like building a print "hello world" in python build system and nothing happens.

我缺少什么? BTW:蟒蛇是在系统路径

I am missing anything? Btw: the python is in the System Path

推荐答案

我不知道确切的问题是什么,这里有出头你可以试试。

I'm not sure what the exact problem is, here are somethings you can try.

0。重新检查

崇高文本2只是调用蟒蛇-u $文件在Linux和Windows。我先在一倍一个新的cmd窗口检查此命令的工作。

Sublime text 2 just calls python -u $file on both linux and windows. I would first double check this command works in a new cmd window.

1。补丁exec.py

在Windows系统的构建过程中打开的新窗口是隐藏的。这将停止图形用户界面,也许蟒蛇终端出现。

On Windows systems new windows opened by the build process are hidden. This stops GUIs and maybe the python terminal from appearing.

您可以禁用此修补包\\ DEFAULT \\ exec.py 注释掉行33:

You can disable this patching Packages\Default\exec.py by commenting out line 33:

startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW

2。间接调用蟒蛇

另一种方法是修改包/ Python的/ Python.sublime建造,使其调用一个bat文件,然后执行Python文件。 (这是我目前在做什么SWF文件)

Another option is to modify Packages/Python/Python.sublime-build so that it calls a bat file which then executes the python file. (this is what I am currently doing for .swf files)

3。硬编码的Python路径

或者,这是不理想,可以尝试硬编码Python路径到像构建文件:

Or, this is not ideal, you can try hard coding the python path into the build file like:

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

希望以上的作品之一。

Hope one of the above works.

这篇关于崇高的文本不建任何东西的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆