Changeset 558d64e in sasview for sasview/sasview.py


Ignore:
Timestamp:
Mar 20, 2016 9:48:40 AM (8 years ago)
Author:
ajj
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:
1ca0ac0
Parents:
02d7952
Message:

Fixing matplotlib directory clash issue

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasview/sasview.py

    rd85c194 r558d64e  
    7979#wxcruft.trace_new_id() 
    8080 
    81 # The below will make sure that sasview application uses the matplotlib font 
    82 # bundled with sasview. 
    83 if hasattr(sys, 'frozen'): 
    84     mplconfigdir = os.path.join(os.path.expanduser("~"), '.matplotlib') 
    85     if not os.path.exists(mplconfigdir): 
    86         os.mkdir(mplconfigdir) 
    87     os.environ['MPLCONFIGDIR'] = mplconfigdir 
    88     reload(sys) 
    89     sys.setdefaultencoding("iso-8859-1") 
     81#Always use private .matplotlib setup to avoid conflicts with other 
     82#uses of matplotlib 
     83mplconfigdir = os.path.join(os.path.expanduser("~"),'.sasview','.matplotlib') 
     84if not os.path.exists(mplconfigdir): 
     85    os.mkdir(mplconfigdir) 
     86os.environ['MPLCONFIGDIR'] = mplconfigdir 
     87reload(sys) 
     88sys.setdefaultencoding("iso-8859-1") 
    9089from sas.sasgui.guiframe import gui_manager 
    9190from sas.sasgui.guiframe.gui_style import GUIFRAME 
Note: See TracChangeset for help on using the changeset viewer.