Changeset fc0fcd0 in sasmodels
- Timestamp:
- Mar 11, 2016 7:13:15 PM (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:
- fdb1487
- Parents:
- bea7acb
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/compare.py
ra4a7308 rfc0fcd0 98 98 kerneldll.ALLOW_SINGLE_PRECISION_DLLS = True 99 99 100 # List of available models 101 ROOT = dirname(__file__) 102 MODELS = [basename(f)[:-3] 103 for f in sorted(glob.glob(joinpath(ROOT, "models", "[a-zA-Z]*.py")))] 100 MODELS = core.list_models() 104 101 105 102 # CRUFT python 2.6 … … 671 668 Parse command line options. 672 669 """ 670 MODELS = core.list_models() 673 671 flags = [arg for arg in sys.argv[1:] 674 672 if arg.startswith('-')] … … 683 681 print(columnize(MODELS, indent=" ")) 684 682 sys.exit(1) 685 if args[0] not in MODELS: 686 print("Model %r not available. Use one of:\n %s"%(args[0], models)) 683 684 name = args[0] 685 try: 686 model_definition = core.load_model_definition(name) 687 except ImportError, exc: 688 print(str(exc)) 689 print("Use one of:\n " + models) 687 690 sys.exit(1) 688 691 if len(args) > 3: … … 764 767 del engines[2:] 765 768 766 name = args[0]767 model_definition = core.load_model_definition(name)768 769 769 n1 = int(args[1]) if len(args) > 1 else 1 770 770 n2 = int(args[2]) if len(args) > 2 else 1
Note: See TracChangeset
for help on using the changeset viewer.