Home Download Buy Blog Forum Support

vPython rendering window does not appear

vPython rendering window does not appear

Postby Lederstrumpf on Sat Mar 03, 2012 3:06 pm

Good day,

I am having trouble getting vPython to work with Sublime Text 2.
After building, the 3D rendering window does not appear.
Could I fix this with a plugin?
I already tried using sublimeREPL, to no avail.
Lederstrumpf
 
Posts: 5
Joined: Sat Mar 03, 2012 2:57 pm

Re: vPython rendering window does not appear

Postby wuub on Sat Mar 03, 2012 3:24 pm

Platform? Architecture? Environment settings? Versions (Python/ST2/vPython)? Any output (errors?) What have you tried exactly? Recreation steps?

Seriously, how are we supposed to help with such vague description? :?:
SublimeREPL via Package Control & SublimePTY dev/pre-alpha. Donations are appreciated, but not required :) Twitter: @wuub
wuub
 
Posts: 218
Joined: Wed Aug 10, 2011 8:16 am
Location: Poland

Re: vPython rendering window does not appear

Postby Lederstrumpf on Sat Mar 03, 2012 3:33 pm

Apologies for being so vague, I am new to the programming environment.

ST2 build: 2181
Python 3.1.3
VPython 5.72

The text output works, but the 3D rendering window does not appear.
The same goes if I use sublimeREPL with either of the three Python options.
Lederstrumpf
 
Posts: 5
Joined: Sat Mar 03, 2012 2:57 pm

Re: vPython rendering window does not appear

Postby wuub on Sat Mar 03, 2012 3:46 pm

Lederstrumpf wrote:Apologies for being so vague, I am new to the programming environment.


And I'm sorry for jumping on you for being vague. I really want to help but don't want to jump through hoops to do it :)

ST2 build: 2181, Python 3.1.3, VPython 5.72


And the system? Windows or OSX or Linux?

If you could also paste a sample code somewhere (eg. http://paste.pocoo.org/) it would help as I'm not familiar with vPytrhon
SublimeREPL via Package Control & SublimePTY dev/pre-alpha. Donations are appreciated, but not required :) Twitter: @wuub
wuub
 
Posts: 218
Joined: Wed Aug 10, 2011 8:16 am
Location: Poland

Re: vPython rendering window does not appear

Postby Lederstrumpf on Sat Mar 03, 2012 4:00 pm

http://paste.pocoo.org/show/560357/

Running this in IDLE yields a 3D rendering of the arrow and the printed text in the console. In ST2, the 3D rendering window does not appear but the text is printed in the console.
Lederstrumpf
 
Posts: 5
Joined: Sat Mar 03, 2012 2:57 pm

Re: vPython rendering window does not appear

Postby wuub on Sat Mar 03, 2012 4:04 pm

I was able to reproduce this on win7 x64. I'll take a look.
SublimeREPL via Package Control & SublimePTY dev/pre-alpha. Donations are appreciated, but not required :) Twitter: @wuub
wuub
 
Posts: 218
Joined: Wed Aug 10, 2011 8:16 am
Location: Poland

Re: vPython rendering window does not appear

Postby Lederstrumpf on Sat Mar 03, 2012 4:29 pm

Ah yes, I forgot to mention that I use Windows 7 32bit.
Lederstrumpf
 
Posts: 5
Joined: Sat Mar 03, 2012 2:57 pm

Re: vPython rendering window does not appear

Postby wuub on Sat Mar 03, 2012 4:32 pm

I've found the problem and will release a fix in SublimeREPL 1.0.18. This should take several minutes.
SublimeREPL via Package Control & SublimePTY dev/pre-alpha. Donations are appreciated, but not required :) Twitter: @wuub
wuub
 
Posts: 218
Joined: Wed Aug 10, 2011 8:16 am
Location: Poland

Re: vPython rendering window does not appear

Postby wuub on Sat Mar 03, 2012 5:17 pm

SublimeREPL 1.0.18 should show up in Package Control in a few minutes. It fixes this issue both for Python REPL and Python - RUN. Problem was caused by the way SublimeREPL (and probably SublimeText2 build systems) was hiding console on windows.

For the interested:
Up until now I was using dwFlags = STARTF_USESHOWWINDOW with wShowWindow = 0 which actually created the console but made it invisible. This cause VPython's window to be hidden as well. I switched to creationflags = 0x8000000 to not create a console window at all and this way I could leave wShowWindow = SW_SHOWNORMAL
SublimeREPL via Package Control & SublimePTY dev/pre-alpha. Donations are appreciated, but not required :) Twitter: @wuub
wuub
 
Posts: 218
Joined: Wed Aug 10, 2011 8:16 am
Location: Poland

Re: vPython rendering window does not appear

Postby Lederstrumpf on Sat Mar 03, 2012 6:02 pm

:D working.

Thanks a bunch for your time and explaining how you altered the code to get it working!
Lederstrumpf
 
Posts: 5
Joined: Sat Mar 03, 2012 2:57 pm


Return to Technical Support

Who is online

Users browsing this forum: Google [Bot], ktaragorn and 28 guests