v = vte.Terminal() AttributeError: 'module' object has no attribute 'Terminal'

S

Steve

Hi,

I try to run a terminal emulation using Python+Gtk+Vte. Before develop
my own sources, i'm testing some examples like this ;
http://www.eurion.net/python-snippets/snippet/Embed a VTE terminal.html

But when i try to run, i get this message error;

v = vte.Terminal()
AttributeError: 'module' object has no attribute 'Terminal'

I'm using ubuntu 9.10 karmic. I've installed (apt-get) python-gtk, /2,
-dev, libvte...

Anyone know if there's a bug on this using karmic, or i must to
download and compile gtk/vte from sources?

thanks,

Steve,
 
B

bruno.desthuilliers

Hi,

I try to run a terminal emulation using Python+Gtk+Vte. Before develop
my own sources, i'm testing some examples like this ;http://www.eurion.net/python-snippets/snippet/Embed a VTE termi...

But when i try to run, i get this message error;

    v = vte.Terminal()
AttributeError: 'module' object has no attribute 'Terminal'


Before any other thing, make sure the "vte" module you imported is the
expected one. Edit your script that way:


# import vte
try:
import vte
except:
error = gtk.MessageDialog (None, gtk.DIALOG_MODAL,
gtk.MESSAGE_ERROR, gtk.BUTTONS_OK,
'You need to install python bindings for libvte')
error.run()
sys.exit (1)
else:
print "using wte module : %s" % vte


and check the module path this prints to your stdout.
 
E

edicionsdigitals.com edicions digitals xarxa socia

Solved! A really dummy error: I've a vte.py file in the same folder,
so import vte found this first than the needed!

Thanks! (and sorry)

Steve,
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,149
Members
46,695
Latest member
StanleyDri

Latest Threads

Top