/[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 377 - (show annotations) (download) (as text)
Wed Mar 15 11:27:22 2006 UTC (14 years, 2 months ago) by johnpye
File MIME type: text/x-python
File size: 1029 byte(s)
By default, no xterm console colour codes are used now.
More output in extfn test python script.
pygtk/interface/Makefile cleans up gcov files when 'make clean'.
1 #!/usr/bin/python
2 import sys, dl, re
3 sys.setdlopenflags(dl.RTLD_GLOBAL|dl.RTLD_NOW)
4
5 import ascend
6 L = ascend.Library()
7
8 #--------------------------------
9 print "\n\n\n\nLOADING EXTERNAL TEST...\n\n\n"
10 L.load("extfntest.a4c")
11
12 #--------------------------------
13 print "\n\n\n\nLOADING INTERNAL TEST...\n\n\n"
14 L.load("intfntest.a4c")
15
16 #--------------------------------
17 print "\n\n\n\nINSTANTIATING TEST...\n\n\n"
18 t = L.findType("test_extfntest")
19 #t = L.findType("test_intfntest")
20 sim = t.getSimulation("S")
21
22 print "\n--------------------------\n"
23 raise RuntimeError("stop")
24 #--------------------------------
25 print "\n\n\n\nLISTING EXTERNAL METHODS...\n\n\n"
26 print chr(27)+"[31;1mEXTERNAL METHODS (!):"+chr(27)+"[0m"
27 ff = L.getExtMethods()
28 for f in ff:
29 fn = f.getName()
30
31 fh = f.getHelp()
32 if not fh:
33 fh = '[no help]'
34 else:
35 mlre = re.compile("\\n")
36 fh = re.sub(mlre,"\n ",fh)
37
38 print chr(27)+"[31;1m"+fn+chr(27)+"[31;2m: "+fh+chr(27)+"[0m"
39
40 #--------------------------------
41 print "\n\n\n\nBUILDING...\n\n\n"
42 sim.build()

Properties

Name Value
svn:executable *

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