diff options
Diffstat (limited to 'doc/libpythonize.html')
-rw-r--r-- | doc/libpythonize.html | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/doc/libpythonize.html b/doc/libpythonize.html index 58a3d12..84a3e22 100644 --- a/doc/libpythonize.html +++ b/doc/libpythonize.html @@ -32,7 +32,7 @@ The method descriptions here apply to both C and C++ versions unless noted. </p> <p> Although libpythonize is used with (and installed with) PyKDE, it has no dependencies itself on -PyKDE/KDE, PyQt/Qt or sip. It does require qmake from TrollTech (part of Qt) to build. +PyKDE/KDE, PyTQt/TQt or sip. It does retquire qmake from TrollTech (part of TQt) to build. </p> <h2>Initialization and Finalization</h2> @@ -47,17 +47,17 @@ accomplishes the same thing. Pythonize obtains the Python global interpreter lock when it initializes Python. It is currently the programmer's responsibility to release the lock when C++ accesses to the interpreter are complete. If the lock is not released, access will be denied to Python code relying on the interpreter (for example -bindings like PyQt or PyKDE). +bindings like PyTQt or PyKDE). </p> <p> -If a second instance of Pythonize is created (within the same parent process), that instance will acquire +If a second instance of Pythonize is created (within the same parent process), that instance will actquire the lock automatically. In order to allow a second (and third or more) instance of Pythonize to be created and obtain the lock, it's necessary to have a related thread state (PyThreadState). This thread state is created by a call to PyThreadState_Get when the first instance of Pythonize is created. The thread state is stored in a global variable (declared in the cpp file) that is used by all subsequent instances of Pythonize. This means that applications using libpythonize are mormally single-threaded, at least in relation to the libpythonize interpreter instance. This is important for utilization with -sip-based bindings like PyKDE and PyQt. +sip-based bindings like PyKDE and PyTQt. </p> <p> The global thread state is accessible via the getThreadState/setThreadState methods. @@ -87,11 +87,11 @@ C: <hr> <h3>Pythonize () [C++] or initialize () [C]</h3> <p> -Constructor/initializer - loads and initializaes the interpreter and acquires the global interpreter lock. +Constructor/initializer - loads and initializaes the interpreter and actquires the global interpreter lock. Sets the value of pythonInit to <b>true</b> on success or <b>false</b> if construction/initialization fails Initializes the global thread state (first instance) or restores the global thread state (second and later instances). It is the programmer's resposibility to release the global interpreter lock to enable other -code to access the interpreter. The lock and thread state are automatically acquired when any Pythonize +code to access the interpreter. The lock and thread state are automatically actquired when any Pythonize instance is created.. </p> <hr> @@ -153,7 +153,7 @@ Runs an arbitrary script in the interpreter and returns Python's result. <hr> <h3>bool runString (char *str);</h3> <p> -Runs an arbitrary string in the interpreter (indentation required for mulit-line +Runs an arbitrary string in the interpreter (indentation retquired for mulit-line strings) and returns Python's result. </p> <hr> @@ -168,9 +168,9 @@ returns the results of the function call as a PyObject. Returns <b>NULL</b> on f Releases the global interpreter lock using PyEval_SaveThread. Saves the global thread state. </p> <hr> -<h3>void acquireLock ()</h3> +<h3>void actquireLock ()</h3> <p> -Acquires the global interpreter lock using PyEval_RestoreThread. Restores the global thread state. +Actquires the global interpreter lock using PyEval_RestoreThread. Restores the global thread state. </p> <hr> <h3>PyThreadState *getThreadState ()</h3> @@ -186,7 +186,7 @@ not affect the global interpreter lock. <hr> <h2>Using libpythonize in an application</h2> <p> -Include the pythonize.h header file (requires Python.h) and link to libpythonize.so - that's pretty much it. There are unit tests +Include the pythonize.h header file (retquires Python.h) and link to libpythonize.so - that's pretty much it. There are unit tests in both C and C++ in the pythonize/tests/ subdirectory. An example of libpythonize usage is in pykpanelapplet.cpp in the PyKDE distribution (pykpanelapplet/ directory). </p> @@ -195,9 +195,9 @@ PyKDE distribution (pykpanelapplet/ directory). At present only the C++/C wrapper versions are available, and they're distributed with PyKDE. </p> <p> -The build process for libpythonize uses TrollTech's qmake (available as part of Qt), but is simple enough +The build process for libpythonize uses TrollTech's qmake (available as part of TQt), but is simple enough to be included in most make files. See the pythonize.pro file for more information - most of the additional -libs required are required by libpython, and may vary by platform. +libs retquired are retquired by libpython, and may vary by platform. </p> <p> You can contact me at this address: <a href="mailto:jbublitz@nwinternet.com">Jim Bublitz <jbublitz@nwinternet.com></a> |