Embedding Python the extreme way

Wolfgang Draxinger wdraxinger at darkstargames.de
Wed Jul 10 17:12:14 EDT 2002


Ok, I took a very carefull look into the sources, and it seems, that the 
problem is not that hard I thought before and ripping the code is just 
mad, though not impossible:
Many of the builtin modules can be removed at compile time using 
config.h. All the modules that can be problematic can be removed without 
problems except 3: sys and some builtin functions.
Now my question. How can I replace them with my own stuff? I don't want 
to do things like Py_RunSimpleString("import engine; import sys; 
sys.stdout=engine.stdout")

I'd appreciate if I could replace it on a pure 'C' basis. Replacing the 
original code were ideal. An absolute must is overriding file access, 
due to the virtual file system. So where can I hook?

-- 
+------------------------------------------------+
| +----------------+ WOLFGANG DRAXINGER          |
| | ,-.   DARKSTAR | lead programmer             |
| |(   ) +---------+ wdraxinger at darkstargames.de |
| | `-' / GAMES /                                |
| +----+''''''''     http://www.darkstargames.de |
+------------------------------------------------+




More information about the Python-list mailing list