Changeset 1f5f206 in sasview for src/sas/models/c_extension/python_wrapper/WrapperGenerator.py
- Timestamp:
- Jul 26, 2015 4:58:27 PM (9 years ago)
- Branches:
- master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- fb3f9af
- Parents:
- e0c16ce
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/models/c_extension/python_wrapper/WrapperGenerator.py
r13e46abe r1f5f206 560 560 def replaceToken(self, line, key, value): #pylint: disable-msg=R0201 561 561 """ Replace a token in the template file 562 @param line: line of text to inspect563 @param key: token to look for564 @param value: string value to replace the token with565 @return: new string value562 :param line: line of text to inspect 563 :param key: token to look for 564 :param value: string value to replace the token with 565 :return: new string value 566 566 """ 567 _str_value = str(value) 568 _new_value = _str_value.replace('\\','/') 567 569 lenkey = len(key) 568 570 newline = line … … 570 572 while newline.count(key) > 0: 571 573 index = newline.index(key) 572 newline = newline[:index] + value + newline[index + lenkey:]574 newline = newline[:index] + _new_value + newline[index + lenkey:] 573 575 574 576 return newline
Note: See TracChangeset
for help on using the changeset viewer.