Home Download Buy Blog Forum Support

wxPython program doesn't load

wxPython program doesn't load

Postby therealdrag0 on Fri Mar 15, 2013 12:40 am

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?
therealdrag0
 
Posts: 6
Joined: Fri Mar 15, 2013 12:21 am

Re: wxPython program doesn't load

Postby facelessuser on Fri Mar 15, 2013 1:08 am

wxPython is not a built in python library, it is a third party library, so it isn't included in Sublime Text.
facelessuser
 
Posts: 1575
Joined: Tue Apr 05, 2011 7:38 pm

Re: wxPython program doesn't load

Postby therealdrag0 on Fri Mar 15, 2013 1:13 am

That's irrelevant.
I am editing python code in Sublime Text 2. I can run most python code with the python build
Code: Select all
{
   "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.
therealdrag0
 
Posts: 6
Joined: Fri Mar 15, 2013 12:21 am

Re: wxPython program doesn't load

Postby facelessuser on Fri Mar 15, 2013 1:25 am

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.
facelessuser
 
Posts: 1575
Joined: Tue Apr 05, 2011 7:38 pm

Re: wxPython program doesn't load

Postby myunlessor on Fri Mar 15, 2013 3:46 am

Specify `pythonw.exe` to run `*.pyw` file and have a try!
myunlessor
 
Posts: 19
Joined: Thu Mar 07, 2013 3:07 am

Re: wxPython program doesn't load

Postby therealdrag0 on Fri Mar 15, 2013 4:52 am

Thanks for the reply, but could you be a bit more specific about how I do that?
therealdrag0
 
Posts: 6
Joined: Fri Mar 15, 2013 12:21 am

Re: wxPython program doesn't load

Postby therealdrag0 on Sun Mar 17, 2013 10:47 pm

Anyone?
therealdrag0
 
Posts: 6
Joined: Fri Mar 15, 2013 12:21 am

Re: wxPython program doesn't load

Postby whisperw on Mon Apr 01, 2013 9:27 am

therealdrag0 wrote:Anyone?


see http://stackoverflow.com/questions/1212 ... ime-text-2
you should modify Data\Packages\Default\exec.py acc to above.
whisperw
 
Posts: 1
Joined: Mon Apr 01, 2013 9:24 am


Return to Technical Support

Who is online

Users browsing this forum: Yahoo [Bot] and 23 guests