[Python-Dev] RELEASED Python 2.3.3 (release candidate 1) Py_Initialize() (original) (raw)
Wiktor Sadowski art at wiktorsadowski.com
Sun Dec 14 18:49:42 EST 2003
- Previous message: [Python-Dev] Pie-thon benchmarks
- Next message: [Python-Dev] RELEASED Python 2.3.3 (release candidate 1) - custom Py_Initialize()
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Adding a few lines (below) to Python would enable custom Py_Initialize() and would allow to setup on time different than existing (import.c-zipimport.c) import mechanisms and changing some other Python-initialization internals without messing with Python core.
It should make life easier for embedders and help writing specialized Python executables (like Zope or Quixote). (We have such specialized executable to run packed Python programs remotely,kind of Java Web Start).
From what I know Python installers (py2exe,Gordon McMillan's installer) could benefit from such addition as well.
All these functions simply expose some modules globals. They don't change anything in Python core.
Best regards, Wiktor Sadowski
/pythonrun.c/ void Internal_Py_SetInitialized(int){initialized=i;} void Internal_PyUnicode_Init(void){_PyUnicode_Init();} void Internal_PyUnicode_Fini(void){_PyUnicode_Fini();} void Internal_PyGILState_Init(PyInterpreterState *s, PyThreadState *ts){_PyGILState_Init(s,ts);} void Internal_PyGILState_Fini(void){_PyGILState_Fini();} long Internal_PyGC_Collect(void){return PyGC_Collect();}
/pythonrun.h/ PyAPI_FUNC(void) Internal_Py_SetInitialized(int i); PyAPI_FUNC(void) Internal_PyUnicode_Init(void); PyAPI_FUNC(void) Internal_PyUnicode_Fini(void); PyAPI_FUNC(void) Internal_PyGILState_Init(PyInterpreterState *, PyThreadState *); PyAPI_FUNC(void) Internal_PyGILState_Fini(void); PyAPI_FUNC(long) Internal_PyGC_Collect(void);
- Previous message: [Python-Dev] Pie-thon benchmarks
- Next message: [Python-Dev] RELEASED Python 2.3.3 (release candidate 1) - custom Py_Initialize()
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]