- Timestamp:
- Mar 16, 2016 8:07:28 AM (9 years ago)
- Branches:
- master, core_shell_microgels, costrafo411, magnetic_model, release_v0.94, release_v0.95, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- 3936ad3, 348557a
- Parents:
- 7b3e62c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/genmodel.py
rd138d43 r91c5fdc 1 import sys 2 sys.path.insert(0,'..') 1 import sys, os 2 sys.path.insert(0, os.path.abspath('..')) 3 from sasmodels import generate, core 3 4 4 # Convert ../sasmodels/models/name.py to sasmodels.models.name 5 module_name = sys.argv[1][3:-3].replace('/','.').replace('\\','.') 6 #print module_name 7 module = __import__(module_name) 8 for part in module_name.split('.')[1:]: 9 module = getattr(module, part) 10 #print module 5 # Convert ../sasmodels/models/name.py to name 6 model_name = os.path.basename(sys.argv[1])[:-3] 11 7 12 8 # Load the doc string from the module definition file and store it in rst 13 from sasmodels import generate 14 docstr = generate.doc(module) 9 docstr = generate.make_doc(core.load_model_info(model_name)) 15 10 open(sys.argv[2],'w').write(docstr)
Note: See TracChangeset
for help on using the changeset viewer.