/[ascend]/trunk/pygtk/testloadunload.py
ViewVC logotype

Contents of /trunk/pygtk/testloadunload.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 532 - (show annotations) (download) (as text)
Mon Apr 24 02:23:08 2006 UTC (18 years, 1 month ago) by johnpye
File MIME type: text/x-python
File size: 901 byte(s)
Removed 'interface' directory in trunk/pygtk/interface (moved everything up a level)
Made corresponding changes to SCons* and spec files.
1 import os, os.path, re
2 import threading, heapq
3 import time, platform
4
5 import sys, dl
6 # This sets the flags for dlopen used by python so that the symbols in the
7 # ascend library are made available to libraries dlopened within ASCEND:
8 sys.setdlopenflags(dl.RTLD_GLOBAL|dl.RTLD_NOW)
9 import ascpy
10
11 if os.getenv('ASCENDLIBRARY')==None:
12 path = '~/src/ascend/trunk/models'
13 print "Setting ASCEND path to",path
14 os.putenv('ASCENDLIBRARY',path)
15
16 L = ascpy.Library();
17 L.load(filepath);
18 for M in L.getModules():
19 print "Looking at module '"+M.getName()+"'"
20 for t in L.getModuleTypes(M):
21 #print "Looking at type '"+str(t.getName())+"'"
22 for m in t.getMethods():
23 print "Looking at method '"+str(m.getName())+"'"
24 if m.getName()==TEST_METHOD_NAME:
25 jobslock.acquire()
26 heapq.heappush(jobs, (0, AscendTestModel( self.filepath,M.getName())) )
27 jobslock.release()
28 del(L)
29 ascendlock.release()
30

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22