Parent Directory
|
Revision Log
Can now access the ASCEND model from an external python script method. The API is not at all nice, but it's basically working now.
| 1 | import extpy; |
| 2 | browser = extpy.getbrowser() |
| 3 | |
| 4 | import ascpy; |
| 5 | |
| 6 | def mypythonmethod(inst): |
| 7 | inst = ascpy.Registry().getInstance('context') |
| 8 | print "HELLO FROM PYTHON" |
| 9 | for i in inst.getChildren(): |
| 10 | print i.getName()," = ",i.getValue() |
| 11 | |
| 12 | """I don't want to talk to you no more, you empty headed animal food trough wiper!""" |
| 13 | browser.reporter.reportNote("No, now go away or I shall taunt you a second time!") |
| 14 | |
| 15 | extpy.registermethod(mypythonmethod) |
| john.pye@anu.edu.au | ViewVC Help |
| Powered by ViewVC 1.1.22 |