Changeset 1790664 in sasview for sansview


Ignore:
Timestamp:
Aug 28, 2014 9:42:24 AM (10 years ago)
Author:
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, 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:
c915053
Parents:
191c648
Message:

include exception details in sasview.log; run scripts as main

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sansview/sansview.py

    r6fe5100 r1790664  
    5858        # modules. We load the fitting module here 
    5959        # to ensure a complete Windows executable build. 
    60          
     60 
    6161        # Fitting perspective 
    6262        try: 
     
    6767            logging.error("Fitting problems: " + str(inst)) 
    6868            logging.error("%s: could not find Fitting plug-in module"% APP_NAME)  
    69             logging.error(sys.exc_value)   
    70              
     69            logging.error(sys.exc_value) 
     70 
    7171        # P(r) perspective 
    7272        try: 
     
    115115    freeze_support() 
    116116    if len(sys.argv) > 1: 
     117        ## Run sasview as an interactive python interpreter 
     118        #if sys.argv[1] == "-i": 
     119        #    sys.argv = ["ipython", "--pylab"] 
     120        #    from IPython import start_ipython 
     121        #    sys.exit(start_ipython()) 
    117122        thing_to_run = sys.argv[1] 
    118123        sys.argv = sys.argv[1:] 
    119124        import runpy 
    120125        if os.path.exists(thing_to_run): 
    121             runpy.run_path(thing_to_run) 
     126            runpy.run_path(thing_to_run, run_name="__main__") 
    122127        else: 
    123             runpy.run_module(thing_to_run) 
     128            runpy.run_module(thing_to_run, run_name="__main__") 
    124129    else: 
    125130        SasView() 
Note: See TracChangeset for help on using the changeset viewer.