Considering using python for something, and need a bit of info :)

PartyG2816 at aol.com PartyG2816 at aol.com
Mon Jan 3 14:50:28 EST 2000


And I have another small question..  After Python is embedded within my app, 
would the scripts written therein be able to modify an existing thing within 
the app? IE, you who know a bit about muds, let's say i have an object, a 
piece of wood for example. My builder wants to change the objects description 
from A long crooked stick. to A smoking, charred stick of unusual 
crookedness. after fire is applied to it. (just first thing that popped into 
my head).  Could the objects properties be modified within that script? The 
object would be an instance of a C++ class in existance within the program 
with a script attached to it.  

The embedding section of the python.org page says you would call 
Py_initialize() to initialize the interpreter, and Py_String/Py_something 
else (cant remember either of the exact names off the top of my head... :P) 
and pass the string/script file into it.

So I pass in my script, how could I let that script modify the actual object 
within the parent program though? :) Is that type of thing possible, or what? 
I don't see why there wouldnt be a way *ponders*, just trying to eliminate 
all of my concerns/questions before i spend my time looking too deeply into 
the subject of me using it in this case :)

JD




More information about the Python-list mailing list