Sublime Forum

Python, system build, new console window [SOLVED]

#1

Hello,

I just noticed that in SublimeText 3 I can build Python applications.
I tried to do that on my own but with no good results ;(

I would like to make Sublime open compiled applications in the new console window and add “click any key to close” after it finishes or sth like that.

I also would like to know how to overwrite the default Sublime build system, because when I add system build named like the default one I just have two builds in the menu with the same name.

Thanks in advance,
Simon

0 Likes

#2

I used sublimeREPL package with below keybind

{ "keys": ["f5"], "command": "run_existing_window_command", "args":
    { "id": "repl_python_run", "file": "config/Python/Main.sublime-menu" }
}
0 Likes

#3

You’ve already marked your problem as solved, but for the sake of completeness and future searches, I’l throw this in anyway.

To modify a package file in place you need to create a file in the Packages folder that mimics the name of the built in file; Sublime will use that file instead of the built in one, so you’d only see one. For your case that would mean creating a folder named Python and putting a Python.sublime-build file inside.

This video covers how to safely modify a package file, if you’d like a visual example (the file you want to edit is Python/Python.sublime-build in this case).

To open a build in an external window, you need your build system to execute a command that would do that. For Windows, that’s something like cmd /c "command here" and for Linux it’s xterm -e "command here". I have video examples for Windows and Linux that demonstrate this as well. I don’t currently have a video for MacOS, but it’s coming soon,

1 Like

#4

Thanks a lot it works for me now with no this extention.
Lovely thanks!

0 Likes