Sublime Forum

How to run python scripts with GUI code?

#1

I can execute python scripts that output text to the console; scripts that attempt to start the wxpython gui loop do not run, or do not show the gui. How can I get these to execute?

0 Likes

#2

Well, maybe it’s not a perfect solution, but you could a new Build System and point it to a tiny python script ( subprocess library ) that launches a Terminal / Command Prompt with “python path/to/your/file.py”, that should do the trick.

Hope it helps!

0 Likes

#3

Is it possible to reference the current buffer’s filepath for this build system??

0 Likes

#4

(I’m necroposting, but the problem is unresolved and others might experience the same problem.)

Check this: ptomato.wordpress.com/2012/02/09 … me-text-2/

For a list of variables in build systems, check this: docs.sublimetext.info/en/latest/ … -variables

0 Likes