468,292 Members | 1,475 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,292 developers. It's quick & easy.

Embedded Python and Tkinter / win32gui

Hello!

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, or has the compilation of the python-dll
specially to be configured?

Thank you for your answer,

Thomas Nücker
Jul 18 '05 #1
2 5560
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>


Jul 18 '05 #2
I configured the paths, so Python can find them, but i further on get
the following error in my program:

File "c:\Python22\lib\lib-tk\Tkinter.py", line 25 in ?
import _tkinter # if this fails your Python may not be configured
for Tk

Where could be the error and how can I configure Python for Tk?
Jul 18 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Fabien | last post: by
2 posts views Thread by Rick Olson | last post: by
reply views Thread by Richard Townsend | last post: by
217 posts views Thread by gyromagnetic | last post: by
2 posts views Thread by sri2097 | last post: by
16 posts views Thread by PyDenis | last post: by
2 posts views Thread by Jay | last post: by
4 posts views Thread by Kevin Osthoff | last post: by
reply views Thread by Teichintx | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.