[pygtk] Embedding Python
Peyman
paskari007 at yahoo.ca
Thu Jan 28 04:17:57 WST 2010
Hi
I am trying to embed a Python script (creates a PyGtk window) in C. I
can get it to work, except when I try to import a module I created. I
have attached a simple example which shows what the problem is
simulator.sh is the script I run to compile and execute the C program.
simulator.c the main C program which calls the Python interpreter.
test_dialogue.py is a simple python script which launches a window,
and two dialogs.
global_variables.py contains some global variables
In test_dialog.py, line 16 ('import global_variables') is commented
out. If I uncomment it, I get an exception: " 'No module named
global_variables' in 'garbage collection' "
Can anyone shed some light as to what this means.
Also, to make the C program work you have to update the full file paths.
Cheers
Peter
-------------- next part --------------
A non-text attachment was scrubbed...
Name: global_variables.py
Type: text/x-python-script
Size: 1559 bytes
Desc: not available
Url : http://www.daa.com.au/pipermail/pygtk/attachments/20100127/9d8ee501/attachment.bin
-------------- next part --------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: simulator.c
Type: application/octet-stream
Size: 497 bytes
Desc: not available
Url : http://www.daa.com.au/pipermail/pygtk/attachments/20100127/9d8ee501/attachment.obj
-------------- next part --------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: simulator.sh
Type: application/octet-stream
Size: 306 bytes
Desc: not available
Url : http://www.daa.com.au/pipermail/pygtk/attachments/20100127/9d8ee501/attachment-0001.obj
-------------- next part --------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_dialogue.py
Type: text/x-python-script
Size: 2128 bytes
Desc: not available
Url : http://www.daa.com.au/pipermail/pygtk/attachments/20100127/9d8ee501/attachment-0001.bin
-------------- next part --------------
More information about the pygtk
mailing list