Changeset 1eae432 in sasview


Ignore:
Timestamp:
Dec 22, 2011 7:11:45 PM (13 years ago)
Author:
Jae Cho <jhjcho@…>
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:
e9f6979
Parents:
e615a0d
Message:

reverted _change_current_dir until we solve the problem with opening sansview/data file from command line

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sansguiframe/src/sans/guiframe/gui_manager.py

    r493c90c r1eae432  
    4545PATH_APP = os.path.dirname(sansview.__file__) 
    4646DATAPATH = PATH_APP 
     47 
     48def _change_current_dir(): 
     49    """ 
     50    Get the path of the current file 
     51    This is for openning sansview/data file from command line 
     52    """ 
     53    tem_path = sys.path[0] 
     54    if os.path.isfile(tem_path): 
     55        tem_path = os.path.dirname(tem_path) 
     56     
     57    os.chdir(os.path.abspath(tem_path)) 
     58_change_current_dir()    
    4759 
    4860def get_user_directory(): 
     
    30223034        temp_path = None 
    30233035        try: 
     3036            _change_current_dir() 
     3037        except: 
     3038            pass 
     3039        try: 
    30243040            self.open_file() 
    30253041        except: 
Note: See TracChangeset for help on using the changeset viewer.