LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Python using compiled VTE library (https://www.linuxquestions.org/questions/programming-9/python-using-compiled-vte-library-741175/)

sadarax 07-19-2009 08:39 AM

(SOLVED) Python import/binding error with compiled VTE library
 
EDIT: Problem solved. I just use my distributions package source and run their compile scripts after editing whatever source files I want.

I'm working on VTE, so I can use it in Python.

I can compile their source files successfully (using autogen.sh and make), but I do not know how to make a 'vtemodule.so' file that I can actually use in my python programs.

python ./demo-test.py #using the simple demo program they provide in the source files
Code:

#!/usr/bin/env python
import vte

I get the error message:
Code:

Traceback (most recent call last):
  File "./vte-demo.py", line 6, in <module>
    import vte
ImportError: No module named vte

I have no idea what to do. Please help.

My build process so far command line:
Code:

bzr branch lp:vte
cd vte
./autogen.sh
make
sudo make install
sudo ldconfig
cd python/
python ./vte-demo.py

The make and make install process do not seem to produce a vte-module that python sees on my system.

bannock 07-21-2009 06:43 PM

Looks like the build of vtemodule.so may have omitted some source files.

sadarax 07-21-2009 11:46 PM

Indeed. I did eventually figure that out. Now I must learn how to make it build the vtemodule.so file and install it.....

sadarax 07-23-2009 08:05 AM

Bump with new information about the problem. See first post.

bannock 07-23-2009 07:32 PM

Try this:
bzr branch lp:vte
cd vte
./autogen.sh
make
cd python
PYTHONPATH=../libs python vte-demo.py


All times are GMT -5. The time now is 06:12 PM.