Sublime Forum

vPython rendering window does not appear

#1

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.

0 Likes

#2

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? :question:

0 Likes

#3

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.

0 Likes

#4

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 :smile:

And the system? Windows or OSX or Linux?

If you could also paste a sample code somewhere (eg. paste.pocoo.org/) it would help as I’m not familiar with vPytrhon

0 Likes

#5

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.

0 Likes

#6

I was able to reproduce this on win7 x64. I’ll take a look.

0 Likes

#7

Ah yes, I forgot to mention that I use Windows 7 32bit.

0 Likes

#8

I’ve found the problem and will release a fix in SublimeREPL 1.0.18. This should take several minutes.

0 Likes

#9

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

0 Likes

#10

:smiley: working.

Thanks a bunch for your time and explaining how you altered the code to get it working!

0 Likes