From fde72003f7ec49021623c00f076cdbd3104e7cde Mon Sep 17 00:00:00 2001 From: Worros Date: Fri, 5 Feb 2010 11:44:27 +0800 Subject: [PATCH] test2.py - Add more tests Added most imports, and printed some formatted output for assiting diagnosis of new user installs --- pyfpdb/test2.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/pyfpdb/test2.py b/pyfpdb/test2.py index 74ce1e72..8acdb089 100755 --- a/pyfpdb/test2.py +++ b/pyfpdb/test2.py @@ -22,12 +22,36 @@ Test if gtk is working. ######################################################################## import sys +import os try: + import gobject as _gobject + print "Import of gobject:\tSuccess" import pygtk + print "Import of pygtk:\tSuccess" pygtk.require('2.0') 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.set_title("Test GTK")