Running external module and accessing the created objects

Kene Meniru Kene.Meniru at illom.org
Sat Mar 9 04:06:28 CET 2013


Program summary:

I have a module called user.py that imports another module called 
app.py. Functions in app.py are used in user.py to describe 3D 
objects. These objects are saved in another object described in 
doc.py.

app.py contains a function called view(). When called in user.py, it 
signals the end of object descriptions. Presently all objects 
contained in doc.py are exported to either POV-Ray or OpenSCAD file 
format depending on the argument given to view().

My Issues:

I have decided I want to provide a preview of the objects using opengl 
(pyglet). So I am trying to create another module called appwin.py 
which the user can launch with user.py as an argument. When each 
object is described in user.py, I want the user to be able to switch 
to appwin.py, provide a signal that makes appwin.py redraw the screen 
to show any modifications (perhaps with the enter key).

I do not want to invest much time with appwin.py now as I am still 
coding app.py. Right now, appwin.py just subclasses 
pyglet.window.Window().

I do not want to merge app.py and appwin.py. I want them to be two 
separate applications because I want to retain the option of either 
console or many different window interfaces.

The problem then is: 

How can I run appwin.py which will then execute user.py to create the 
objects to be saved in doc.py. Then when view() is encountered to be 
able to access the objects stored in doc.py in appwin.py?

Any ideas will help.

-- 

Kene
::::::::::::::::::
KeMeniru at gmail.com




More information about the Python-list mailing list