Embedded Python and Tkinter / win32gui

Fredrik Lundh fredrik at pythonware.com
Tue Jun 24 09:37:58 EDT 2003


Thomas Nücker wrote:

> I am using the python dll within a visual-c++ project. In the project
> i am also handling python scripts. Since i want to use some
> message-boxes i want to have the opportunity to import modules in the
> script.
>
> Now there is the question:
> How do i have to configure / compile the python-dll so i can use the
> tkinter-module or the win32gui module? Is this only a problem of where
> the modules are storred

just make sure that Python can find them, for example by calling
Py_SetPythonHome with the installation "root" directory (put the
files in <root>/Lib and <root>/DLLs etc, just like the standard
Python install does).

alternatively, you can manipulate the PYTHONHOME or PYTHONPATH
environment variables before initializing the Python interpreter.

(if you need more alternatives, check the Python source code)

> or has the compilation of the python-dll specially to be
> configured?

hopefully not.

</F>








More information about the Python-list mailing list