Sublime Forum

wxPython program doesn't load

#1

I’m working on a python program. It runs if I run it via cmd or any other program. Also other python code runs fine from within Sublime.

When I build the console says, “Running python -u C:\Dropbox\Code Projects\Lending Club Py\main.py”
It’s a windowed application using wxPython. If I put in a print before “app.MainLoop()” then that’ll print, but nothing else happens.

… Any ideas?

0 Likes

#2

wxPython is not a built in python library, it is a third party library, so it isn’t included in Sublime Text.

0 Likes

#3

That’s irrelevant.
I am editing python code in Sublime Text 2. I can run most python code with the python build

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

However, one application I’m working on doesn’t run ONLY in Sublime Text 2. Actually it runs, but the wxPython window doesn’t display, ONLY in Sublime. Other wxPython scripts’ windows DO display. And if I run my code in from the command line, IDLE, PyScripter, WingIDE, or PyCharm, it works in every one. So it it something localized to my script and sublime 2. That is why I’m here.

0 Likes

#4

Probably should have read better…missed the reference to building.

I don’t usually test my python code through Sublime, so I can’t help you here. Good luck.

0 Likes

#5

Specify pythonw.exe to run *.pyw file and have a try!

0 Likes

#6

Thanks for the reply, but could you be a bit more specific about how I do that?

0 Likes

#7

Anyone?

0 Likes

#8

see stackoverflow.com/questions/1212 … ime-text-2
you should modify Data\Packages\Default\exec.py acc to above.

0 Likes