~jonobacon/python-snippets/trunk

« back to all changes in this revision

Viewing changes to pythonvte/vtest.py

  • Committer: Jono Bacon
  • Date: 2010-04-10 20:23:48 UTC
  • mfrom: (81.6.2 python-snippets)
  • Revision ID: jono@ubuntu.com-20100410202348-cfu9arbhr938kyzu
Added 'import sys' for import gtk or vte exceptions.

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
# [SNIPPET_CATEGORIES: Python VTE]
5
5
# [SNIPPET_DESCRIPTION: Embed a VTE terminal in your application]
6
6
 
 
7
import sys
 
8
 
7
9
try:
8
10
    import gtk
9
11
except:
10
12
    print >> sys.stderr, "You need to install the python gtk bindings"
11
13
    sys.exit(1)
12
 
  
 
14
 
13
15
# import vte
14
16
try:
15
17
    import vte
18
20
        'You need to install python bindings for libvte')
19
21
    error.run()
20
22
    sys.exit (1)
21
 
  
 
23
 
22
24
if __name__ == '__main__':
23
25
    # create the terminal
24
26
    v = vte.Terminal()