Changeset d8e3f7c in sasview for invariantview/src


Ignore:
Timestamp:
Aug 16, 2012 3:12:59 PM (12 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:
5401f2a
Parents:
f866fb5
Message:

mac open file fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • invariantview/src/sans/perspectives/invariant/report_dialog.py

    r7954acd rd8e3f7c  
    1818import os 
    1919import wx.html as html 
    20  
    21 if sys.platform.count("win32") > 0: 
     20ISPDF = False 
     21if sys.platform == "win32": 
    2222    _STATICBOX_WIDTH = 450 
    2323    PANEL_WIDTH = 500  
     
    2525    FONT_VARIANT = 0 
    2626    ISMAC = False 
    27 else: 
     27    ISPDF = True 
     28elif sys.platform == "darwin": 
    2829    _STATICBOX_WIDTH = 480 
    2930    PANEL_WIDTH = 530 
     
    3132    FONT_VARIANT = 1 
    3233    ISMAC = True 
    33 ISPDF = True 
     34    ISPDF = True 
    3435   
    3536class ReportDialog(wx.Dialog): 
     
    171172            #open pdf 
    172173            if pdf: 
    173                 os.startfile(str(fName)) 
     174                try: 
     175                    #Windows 
     176                    os.startfile(str(fName)) 
     177                except: 
     178                    try: 
     179                        #Mac 
     180                        os.system("open %s"% fName) 
     181                    except: 
     182                        #DO not open 
     183                        pass 
    174184            #delete image file 
    175185            os.remove(pic_fname) 
Note: See TracChangeset for help on using the changeset viewer.