Just a curious Question,
Is there a way of putting Vpython in wxpython as we do in case of wx.MediaCtrl and other stuffs?

Recommended Answers

All 10 Replies

Vpython and wxPython each use their own event loops, so it will not be easy and very smooth.

So not possible?
How difficult and effective is pyOpenGL compared to Vpython?
Can anyone give a simple comparison?

Anyone with update on the two frameworks

The Open Graphics Library (OGL) is now well integrated with wxPython, but to go from there to something that works like VPython you need lots of work:

import wx
import wx.lib.ogl as ogl

class MyFrame(wx.Frame):
    def __init__(self):
        wx.Frame.__init__( self, None, wx.ID_ANY,
            title="explore wx.lib.ogl", size=(400,300))

        canvas = ogl.ShapeCanvas(self)

        diagram = ogl.Diagram()
        # marry the two ...

        # create some standard shapes ...
        # (check how creation order affects overlap)
        circle = ogl.CircleShape(100.0) # radius
        circle.SetX(75.0)  # center x

        text = ogl.TextShape(250, 30)  # (w, h)
        text.SetX(180)  # center x
        text.AddText("you can drag the circle or the text")


        # use v box sizer
        sizer = wx.BoxSizer(wx.VERTICAL)
        # canvas will grow as frame is stretched
        sizer.Add(canvas, 1, wx.GROW)

app = wx.App()

Any documentation on Open GL in wxPython?

hello I am using wxPython and the graphics I use import visual and from visual.graph import*, but I can't see nothing , i don't have error but I don't see nothing either, somebody Know why is that?
because my program is ok without wxPython, but when I put interface with wxPython it doesn't run

Hav you read the thread?
they are not yet integrated. So I think good candindate to answer this question is Vpython mailing list or wxPython ones. They are both very active lists

I haven't read the thread, where can I find?

where can I find some tutorial, because I don't have any error , but I can't see my graphic.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.