Sublime text don't build anything

I used Sublime Text 2 on Ubuntu Linux and worked very well.

Now that I use it on Windows, I can’t build anything. It appears “building” in the status bar below, and then does nothing. I did a trivial test, for example, built a "hello world" for printing in the python build system, and nothing happens.

Am I missing anything? Btw: python is in the system path

+4
source share
2 answers

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

0. Recheck

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

1. Patch exec.py

Windows systems open new windows opened by the build process. This stops the use of graphical interfaces and the appearance of python terminals is possible.

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

 startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW 

2. Indirect python call

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

3. Hardcoding Python path

Or this is not ideal, you can try hard-coded the python path to the assembly file, for example:

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

Hope one of the above works.

+4
source

I have the same problem with

 cmd: ["mongo","<","$file"] 

and when I changed to

 cmd: ["mongo $file"] 

it worked.

0
source

Source: https://habr.com/ru/post/1442619/


All Articles