File: sanitycheck.py

package info (click to toggle)
fontypython 0.4.6-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 1,152 kB
  • ctags: 559
  • sloc: python: 3,619; makefile: 10
file content (45 lines) | stat: -rw-r--r-- 1,449 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
##	Fonty Python Copyright (C) 2006, 2007, 2008, 2009 Donn.C.Ingle
##	Contact: donn.ingle@gmail.com - I hope this email lasts.
##
##	This file is part of Fonty Python.
##	Fonty Python is free software: you can redistribute it and/or modify
##	it under the terms of the GNU General Public License as published by
##	the Free Software Foundation, either version 3 of the License, or
##	(at your option) any later version.
##
##	Fonty Python is distributed in the hope that it will be useful,
##	but WITHOUT ANY WARRANTY; without even the implied warranty of
##	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
##	GNU General Public License for more details.
##
##	You should have received a copy of the GNU General Public License
##	along with Fonty Python.  If not, see <http://www.gnu.org/licenses/>.

import sys
import strings

## Quick tests - which is there?
## Using imp will find a module very quickly, faster than import x
import imp

## PIL : Is it there?
try: 
	import Image, ImageFont, ImageDraw 
except: 
	print strings.PILError
	raise SystemExit

try:
	import wxversion ## Dec 2007: noticed that it may not be installed along with wxPython....
	wxversion.ensureMinimal("3.0")
        ## June 25, 2016 - wxversion is now 3.0
        ## I am remarking out the old line:
	##wxversion.ensureMinimal("2.8") 
except:
	print strings.wxVersionError
	print
try:
	imp.find_module("wx")
except: 
	print strings.wxError
	raise SystemExit