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

bruno.desthuilliers at gmail.com bruno.desthuilliers at gmail.com
Tue Dec 7 11:34:08 EST 2010


On 7 déc, 12:05, Steve <steve.gnuli... at gmail.com> wrote:
> 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%20a%20VTE%20termi...
>
> 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.




More information about the Python-list mailing list