/[ascend]/trunk/models/johnpye/extfn/extfntest.py
ViewVC logotype

Contents of /trunk/models/johnpye/extfn/extfntest.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 381 - (show annotations) (download) (as text)
Sun Mar 19 23:01:39 2006 UTC (14 years, 6 months ago) by johnpye
File MIME type: text/x-python
File size: 1084 byte(s)
Fixing 'auto package registration' with 'libstemname_register'.
Fixed bug #247.
1 #!/usr/bin/python
2 import platform
3 if platform.system() != "Windows":
4 import sys, re, dl
5 sys.setdlopenflags(dl.RTLD_GLOBAL|dl.RTLD_NOW)
6
7 import ascend
8 L = ascend.Library()
9
10 #--------------------------------
11 print "\n\n\n\nLOADING EXTERNAL TEST...\n\n\n"
12 L.load("extfntest.a4c")
13
14 #--------------------------------
15 #print "\n\n\n\nLOADING INTERNAL TEST...\n\n\n"
16 #L.load("intfntest.a4c")
17
18 #--------------------------------
19 print "\n\n\n\nINSTANTIATING TEST...\n\n\n"
20 t = L.findType("test_extfntest")
21 #t = L.findType("test_intfntest")
22 sim = t.getSimulation("S")
23
24 print "\n--------------------------\n"
25 raise RuntimeError("stop")
26 #--------------------------------
27 print "\n\n\n\nLISTING EXTERNAL METHODS...\n\n\n"
28 print chr(27)+"[31;1mEXTERNAL METHODS (!):"+chr(27)+"[0m"
29 ff = L.getExtMethods()
30 for f in ff:
31 fn = f.getName()
32
33 fh = f.getHelp()
34 if not fh:
35 fh = '[no help]'
36 else:
37 mlre = re.compile("\\n")
38 fh = re.sub(mlre,"\n ",fh)
39
40 print chr(27)+"[31;1m"+fn+chr(27)+"[31;2m: "+fh+chr(27)+"[0m"
41
42 #--------------------------------
43 print "\n\n\n\nBUILDING...\n\n\n"
44 sim.build()

Properties

Name Value
svn:executable *

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