Embedded Python and Tkinter / win32gui

Discussion in 'Python' started by =?ISO-8859-1?Q?Thomas_N=FCcker?=, Jun 24, 2003.

  1. 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
    =?ISO-8859-1?Q?Thomas_N=FCcker?=, Jun 24, 2003
    #1
    1. Advertising

  2. 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>
    Fredrik Lundh, Jun 24, 2003
    #2
    1. Advertising

  3. 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?
    =?ISO-8859-1?Q?Thomas_N=FCcker?=, Jun 25, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. John Torjo

    [ann] WIN32GUI - v1.5.1 released

    John Torjo, Oct 13, 2004, in forum: C++
    Replies:
    32
    Views:
    1,037
    Ioannis Vranos
    Oct 29, 2004
  2. Replies:
    1
    Views:
    425
    matthias_k
    Jan 26, 2005
  3. Martin v. =?iso-8859-15?q?L=F6wis?=

    Re: Compiling Python with Tkinter and win32gui

    Martin v. =?iso-8859-15?q?L=F6wis?=, Jun 27, 2003, in forum: Python
    Replies:
    0
    Views:
    843
    Martin v. =?iso-8859-15?q?L=F6wis?=
    Jun 27, 2003
  4. Corwan
    Replies:
    1
    Views:
    479
    Mark Hammond
    Feb 1, 2004
  5. Replies:
    3
    Views:
    2,079
Loading...

Share This Page