C-Python API problem

Rajorshi Biswas rajorshi at in.com
Tue Jan 27 11:40:52 CET 2009

Hi, I was trying out the sample program to load a python script from C in the Python tutorial at http://docs.python.org/extending/embedding.html (Section: Pure Embedding).Usage: call pythonfile funcname [args] When running this script, I can run things like the following:call mytest foobut not any function which calls a Tk function:call mytest teekay Here is my mytest.py module:def foo():print "func"def teekay():import Tkinterr=Tkinter.Tkr()I get the following error in the latter case:Traceback (most recent call last):...import Tkinter ...import tkinter # If this fails your Python may not be configured for TkImportError: /software/lib/Linuxx86/python2.6/lib/python2.6/libdynload/tkinter.so: undefined symbol: PyTrueStructCall failedObviously, trying this from within a Python shell works fine.Any clues?Thanks,RajRajhttp://www.rajorshi.net/blogDear pythonlist ! Get Yourself a cool, short @in.com Email ID now!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20090127/c53cada5/attachment.html>

More information about the Python-list mailing list