Changeset 4b26bc14 in sasview


Ignore:
Timestamp:
Aug 31, 2017 10:21:57 AM (7 years ago)
Author:
Paul Kienzle <pkienzle@…>
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:
28b7048
Parents:
87fc3b6
Message:

fallback to builtin console if ipython is not available in console mode

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sasview/sasview.py

    r7c105e8 r4b26bc14  
    191191    if len(sys.argv) == 1: 
    192192        # Run sasview as an interactive python interpreter 
    193         sys.argv = ["ipython", "--pylab"] 
    194         from IPython import start_ipython 
    195         sys.exit(start_ipython()) 
     193        try: 
     194            from IPython import start_ipython 
     195            sys.argv = ["ipython", "--pylab"] 
     196            sys.exit(start_ipython()) 
     197        except ImportError: 
     198            import code 
     199            code.interact() 
    196200    else: 
    197201        # Run sasview as a python script interpreter 
Note: See TracChangeset for help on using the changeset viewer.