Mercurial > fife-parpg
comparison tests/swig_tests/swig_test_utils.py @ 0:4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
author | mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222 |
---|---|
date | Sun, 29 Jun 2008 18:44:17 +0000 |
parents | |
children | 81641655bc38 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:4a0efb7baf70 |
---|---|
1 #!/usr/bin/env python | |
2 import os, sys, unittest | |
3 | |
4 def genpath(somepath): | |
5 return os.path.sep.join(somepath.split('/')) | |
6 | |
7 _paths = ('engine/swigwrappers/python', 'engine/extensions') | |
8 for p in _paths: | |
9 if p not in sys.path: | |
10 sys.path.append(os.path.sep.join(p.split('/'))) | |
11 | |
12 import fife, fifelog | |
13 | |
14 def getEngine(minimized=False): | |
15 e = fife.Engine() | |
16 log = fifelog.LogManager(e, promptlog=False, filelog=True) | |
17 #log.setVisibleModules('all') | |
18 s = e.getSettings() | |
19 #s.setRenderBackend('OpenGL') | |
20 s.setDefaultFontPath('tests/data/FreeMono.ttf') | |
21 s.setDefaultFontGlyphs(" abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" + | |
22 ".,!?-+/:();%`'*#=[]") | |
23 if minimized: | |
24 s.setScreenWidth(1) | |
25 s.setScreenHeight(1) | |
26 s.setDefaultFontSize(12) | |
27 e.init() | |
28 return e | |
29 | |
30 __all__ = [] | |
31 __all__.append('unittest') | |
32 __all__.append('fife') | |
33 __all__.append('fifelog') | |
34 __all__.append('genpath') | |
35 __all__.append('getEngine') |