Changeset e65c3ba in sasmodels for sasmodels/generate.py
- Timestamp:
- Nov 28, 2017 6:09:34 PM (6 years ago)
- Branches:
- master, core_shell_microgels, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- 32398dc
- Parents:
- 110f69c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/generate.py
rff10479 re65c3ba 163 163 164 164 import sys 165 from os.path import abspath, dirname, join as joinpath, exists, isdir,getmtime165 from os.path import abspath, dirname, join as joinpath, exists, getmtime 166 166 import re 167 167 import string … … 654 654 line instead. 655 655 """ 656 for path, code in sources:656 for _path, code in sources: 657 657 if _IQXY_PATTERN.search(code): 658 658 return True 659 else: 660 return False 659 return False 661 660 662 661 … … 772 771 # TODO: allow mixed python/opencl kernels? 773 772 774 ocl = kernels(kernel_code, call_iq, call_iqxy, clear_iqxy, model_info.name)775 dll = kernels(kernel_code, call_iq, call_iqxy, clear_iqxy, model_info.name)773 ocl = _kernels(kernel_code, call_iq, call_iqxy, clear_iqxy, model_info.name) 774 dll = _kernels(kernel_code, call_iq, call_iqxy, clear_iqxy, model_info.name) 776 775 result = { 777 776 'dll': '\n'.join(source+dll[0]+dll[1]+dll[2]), … … 782 781 783 782 784 def kernels(kernel, call_iq, call_iqxy, clear_iqxy, name):783 def _kernels(kernel, call_iq, call_iqxy, clear_iqxy, name): 785 784 # type: ([str,str], str, str, str) -> List[str] 786 785 code = kernel[0] … … 931 930 932 931 def make_html(model_info): 932 # type: (ModelInfo) -> str 933 933 """ 934 934 Convert model docs directly to html. … … 940 940 941 941 def view_html(model_name): 942 # type: (str) -> None 943 """ 944 Load the model definition and view its help. 945 """ 942 946 from . import modelinfo 943 947 kernel_module = load_kernel_module(model_name) … … 946 950 947 951 def view_html_from_info(info): 952 # type: (ModelInfo) -> None 953 """ 954 View the help for a loaded model definition. 955 """ 948 956 from . import rst2html 949 957 url = "file://"+dirname(info.filename)+"/" … … 970 978 Program which prints the source produced by the model. 971 979 """ 972 import sys973 980 from .modelinfo import make_model_info 974 981
Note: See TracChangeset
for help on using the changeset viewer.