Changeset df7a7e3 in sasview for sansview


Ignore:
Timestamp:
Sep 17, 2012 7:11:50 PM (12 years ago)
Author:
Mathieu Doucet <doucetm@…>
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:
b71a53b
Parents:
cf7653d3
Message:

merging category branch

Location:
sansview
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • sansview/sansview.py

    r10b3e1e rdf7a7e3  
    1111import os 
    1212import logging 
     13from shutil import copy 
    1314logging.basicConfig(level=logging.INFO, 
    1415                    format='%(asctime)s %(levelname)s %(message)s', 
     
    6768            fitting_plug = module.Plugin() 
    6869            self.gui.add_perspective(fitting_plug) 
    69         except: 
     70        except Exception as inst: 
     71            logging.error("Fitting problems: " + str(inst)) 
    7072            logging.error("%s: could not find Fitting plug-in module"% APP_NAME)  
    7173            logging.error(sys.exc_value)   
     
    101103            logging.error(sys.exc_value)   
    102104 
     105        # initialize category stuff 
     106        user_file = os.path.join(os.path.expanduser("~"), 
     107                                 'serialized_categories.p') 
     108         
     109        if not os.path.isfile(user_file):  
     110            # either first time starting sansview or the 
     111            # user has deleted their category file 
     112            my_dir = os.path.dirname(os.path.abspath(__file__)) 
     113            default_file = os.path.join(my_dir, '..', 
     114                                        'sansmodels', 
     115                                        'default_categories.p' ) 
     116            copy(default_file, user_file) 
     117 
    103118             
    104119        # Add welcome page 
  • sansview/setup_exe.py

    rc329f4d rdf7a7e3  
    1616import os, sys 
    1717import platform 
     18 
    1819 
    1920if len(sys.argv) == 1: 
     
    328329    bundle_option = 3 
    329330 
     331#initialize category stuff 
     332from sans.guiframe.CategoryInstaller import CategoryInstaller 
     333CategoryInstaller.check_install() 
     334 
     335 
     336 
    330337setup( 
    331338    windows=[target_wx_client], 
  • sansview/setup_mac.py

    re558e0b rdf7a7e3  
    9393EXTENSIONS_LIST = find_extension() 
    9494 
     95#initialize category stuff 
     96from sans.guiframe.CategoryInstaller import CategoryInstaller 
     97CategoryInstaller.check_install() 
     98 
     99 
    95100  
    96101plist = dict(CFBundleDocumentTypes=[dict(CFBundleTypeExtensions=EXTENSIONS_LIST, 
Note: See TracChangeset for help on using the changeset viewer.