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.lib.ogl as ogl
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()
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
Hi, as I was told that my code doesn’t scale well at all, I thought perhaps I’d try to get a better understanding of interfaces/abstract classes and classes and the relationship between them.
I don’t want at this stage work on a big separate project as I've already got plenty ...
Hey, so I wanna ask how I need to create a method who will remove word if in that word is 2 same chars. Example: "Potato" in this word there is a 2 "o" chars so this word will need to be removed. "Forum" in this word there is no ...
Hi I'm having a problem implementing a mini shopping cart drop down in the header to show the user all the products they have in their shopping cart. It seems the only solution for this is Ajax, and I've looked all over and can't find anything that I could possibly ...