/[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 302 - (show annotations) (download) (as text)
Mon Feb 20 07:40:03 2006 UTC (16 years, 7 months ago) by johnpye
File MIME type: text/x-python
File size: 510 byte(s)
Minor fix following changes to error_reporter
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 L.load("extfntest.a4c")
9 t = L.findType("test_extfntest")
10 sim = t.getSimulation("S")
11
12 print chr(27)+"[31;1mEXTERNAL FUNCTIONS:"+chr(27)+"[0m"
13 ff = L.getExtMethods()
14 for f in ff:
15 fn = f.getName()
16
17 fh = f.getHelp()
18 if not fh:
19 fh = '[no help]'
20 else:
21 mlre = re.compile("\\n")
22 fh = re.sub(mlre,"\n ",fh)
23
24 print chr(27)+"[31;1m"+fn+chr(27)+"[31;2m: "+fh+chr(27)+"[0m"
25
26
27 sim.build()

Properties

Name Value
svn:executable *

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