Changeset 0225a3f in sasview
- Timestamp:
- Sep 26, 2017 10:38:19 AM (7 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, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 36ca21e
- Parents:
- d5aeaa3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
run.py
r2ecb0a5 r0225a3f 1 #!/usr/bin/env python 1 2 # -*- coding: utf-8 -*- 2 #!/usr/bin/env python3 3 """ 4 4 Run sasview in place. This allows sasview to use the python -
src/sas/sasview/sasview.py
r9e6aeaf r0225a3f 18 18 import logging 19 19 20 reload(sys) 21 sys.setdefaultencoding("iso-8859-1") 20 try: 21 reload(sys) 22 sys.setdefaultencoding("iso-8859-1") 23 except NameError: 24 # On python 3 sys.setdefaultencoding does nothing, so pass. 25 # We know we are in python 3 at this point since reload is no longer in 26 # builtins, but instead has been moved to importlib, hence the NameError. 27 pass 22 28 23 29 import sas … … 233 239 import code 234 240 code.interact(local={'exit': sys.exit}) 241 elif sys.argv[1] == '-c': 242 exec(sys.argv[2]) 235 243 else: 236 244 thing_to_run = sys.argv[1]
Note: See TracChangeset
for help on using the changeset viewer.