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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 434 - (hide annotations) (download) (as text)
Tue Apr 4 07:45:54 2006 UTC (14 years, 5 months ago) by johnpye
File MIME type: text/x-python
File size: 1058 byte(s)
Taking out the 'stop' in models/johnpye/extfn/extfntest.py
1 johnpye 209 #!/usr/bin/python
2 johnpye 381 import platform
3     if platform.system() != "Windows":
4     import sys, re, dl
5     sys.setdlopenflags(dl.RTLD_GLOBAL|dl.RTLD_NOW)
6 johnpye 209
7     import ascend
8     L = ascend.Library()
9    
10 johnpye 377 #--------------------------------
11     print "\n\n\n\nLOADING EXTERNAL TEST...\n\n\n"
12 johnpye 209 L.load("extfntest.a4c")
13 johnpye 377
14     #--------------------------------
15 johnpye 380 #print "\n\n\n\nLOADING INTERNAL TEST...\n\n\n"
16     #L.load("intfntest.a4c")
17 johnpye 377
18     #--------------------------------
19     print "\n\n\n\nINSTANTIATING TEST...\n\n\n"
20 johnpye 209 t = L.findType("test_extfntest")
21 johnpye 377 #t = L.findType("test_intfntest")
22 johnpye 209 sim = t.getSimulation("S")
23    
24 johnpye 377 print "\n--------------------------\n"
25 johnpye 434
26 johnpye 377 #--------------------------------
27     print "\n\n\n\nLISTING EXTERNAL METHODS...\n\n\n"
28     print chr(27)+"[31;1mEXTERNAL METHODS (!):"+chr(27)+"[0m"
29 johnpye 302 ff = L.getExtMethods()
30 johnpye 209 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 johnpye 377 #--------------------------------
43     print "\n\n\n\nBUILDING...\n\n\n"
44 johnpye 209 sim.build()

Properties

Name Value
svn:executable *

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