test2.py - Add more tests

Added most imports, and printed some formatted output for assiting diagnosis of new user installs
This commit is contained in:
Worros 2010-02-05 11:44:27 +08:00
parent afde406cc9
commit fde72003f7

View File

@ -22,12 +22,36 @@ Test if gtk is working.
######################################################################## ########################################################################
import sys import sys
import os
try: try:
import gobject as _gobject
print "Import of gobject:\tSuccess"
import pygtk import pygtk
print "Import of pygtk:\tSuccess"
pygtk.require('2.0') pygtk.require('2.0')
import gtk import gtk
print "Import of gtk:\t\tSuccess"
import pango
print "Import of pango:\tSuccess"
if os.name == 'nt':
import win32
import win32api
print "Import of win32:\tSuccess"
try:
import matplotlib
matplotlib.use('GTK')
print "Import of matplotlib:\tSuccess"
import numpy
print "Import of numpy:\tSuccess"
import pylab
print "Import of pylab:\tSuccess"
except:
print "\nError:", sys.exc_info()
print "\npress return to finish"
sys.stdin.readline()
win = gtk.Window(gtk.WINDOW_TOPLEVEL) win = gtk.Window(gtk.WINDOW_TOPLEVEL)
win.set_title("Test GTK") win.set_title("Test GTK")