Changeset 3d29cab0 in sasview


Ignore:
Timestamp:
Feb 17, 2015 10:00:41 AM (9 years ago)
Author:
smk78
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:
c147870
Parents:
6f10243 (diff), 3ef5b2f (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of https://github.com/SasView/sasview.git

Files:
1 added
7 edited

Legend:

Unmodified
Added
Removed
  • check_packages.py

    rb52f47f r61c93b3  
    2424    'wx':{'version':'2.8.12.1','import_name':'wx','test':'__version__'}, 
    2525    'matplotlib':{'version':'1.1.0','import_name':'matplotlib','test':'__version__'}, 
    26     'pisa':{'version':'3.0.28','import_name':'ho.pisa','test':'__version__'}, 
     26    'xhtml2pdf':{'version':'3.0.33','import_name':'xhtml2pdf','test':'__version__'}, 
    2727    'sphinx':{'version':'1.2.1','import_name':'sphinx','test':'__version__'}, 
    2828    'unittest-xml-reporting':{'version':'1.10.0','import_name':'xmlrunner','test':'__version__'}, 
  • sasview/setup_exe.py

    r4172557 r61c93b3  
    308308packages = [ 
    309309    'matplotlib', 'scipy', 'encodings', 'comtypes', 
    310     'win32com', 'ho.pisa', 'bumps', 
     310    'win32com', 'xhtml2pdf', 'bumps', 
    311311    ] 
    312312packages.extend([ 
  • src/sas/guiframe/gui_manager.py

    ra4340d1 r4d5c42f  
    21292129                    logging.error("Error in _onTutorial: %s" % sys.exc_value) 
    21302130                    try: 
    2131                         #in case when the pdf default set other than acrobat 
    2132                         import ho.pisa as pisa 
     2131                        # Try an alternate method 
     2132                        logging.error("Could not open the tutorial pdf, trying xhtml2pdf") 
     2133                        from xhtml2pdf import pisa 
    21332134                        pisa.startViewer(path) 
    21342135                    except: 
     2136                        logging.error("Could not open the tutorial pdf with xhtml2pdf") 
    21352137                        msg = "This feature requires 'PDF Viewer'\n" 
    2136                         msg += "Please install it first (Free)..." 
    21372138                        wx.MessageBox(msg, 'Error') 
    21382139            else: 
     
    21422143                except: 
    21432144                    try: 
    2144                         #in case when the pdf default set other than preview 
    2145                         import ho.pisa as pisa 
     2145                        # Try an alternate method 
     2146                        logging.error("Could not open the tutorial pdf, trying xhtml2pdf") 
     2147                        from xhtml2pdf import pisa 
    21462148                        pisa.startViewer(path) 
    21472149                    except: 
    2148                         msg = "This feature requires 'Preview' Application\n" 
    2149                         msg += "Please install it first..." 
     2150                        logging.error("Could not open the tutorial pdf with xhtml2pdf") 
     2151                        msg = "This feature requires the 'Preview' application\n" 
    21502152                        wx.MessageBox(msg, 'Error') 
    21512153 
  • src/sas/perspectives/fitting/report_dialog.py

    rd06ae30 r4ec242e  
    1717import os 
    1818import wx.html as html 
     19import logging 
    1920 
    2021_STATICBOX_WIDTH = 480 
     
    297298        """ 
    298299        Create a PDF file from html source string. 
     300        Returns True is the file creation was successful.  
    299301         
    300302        : data: html string 
    301303        : filename: name of file to be saved 
    302304        """ 
    303         import ho.pisa as pisa 
    304         f = file(filename, "wb") 
    305         # pisa requires some extra packages, see their web-site 
    306         pdf = pisa.CreatePDF(data, f) 
    307  
    308         # close the file here otherwise it will be open until quitting 
    309         #the application. 
    310         f.close() 
    311         self.Update() 
    312         return not pdf.err 
     305        try: 
     306            from xhtml2pdf import pisa 
     307            # open output file for writing (truncated binary) 
     308            resultFile = open(filename, "w+b") 
     309            # convert HTML to PDF 
     310            pisaStatus = pisa.CreatePDF(data, dest=resultFile) 
     311            # close output file 
     312            resultFile.close() 
     313            self.Update() 
     314            return pisaStatus.err 
     315        except: 
     316            logging.error("Error creating pdf: %s" % sys.exc_value) 
     317        return False 
  • src/sas/perspectives/invariant/report_dialog.py

    r79492222 r4ec242e  
    1818import os 
    1919import wx.html as html 
     20import logging 
    2021ISPDF = False 
    2122if sys.platform == "win32": 
     
    246247    def HTML2PDF(self, data, filename): 
    247248        """ 
    248         Create a PDF file from html source string.  
     249        Create a PDF file from html source string. 
     250        Returns True is the file creation was successful.  
    249251         
    250252        : data: html string 
    251253        : filename: name of file to be saved 
    252254        """ 
    253         import ho.pisa as pisa 
    254         f = file(filename, "wb") 
    255         # pisa requires some extra packages, see their web-site 
    256         pdf = pisa.CreatePDF(data, f) 
    257         # close the file here otherwise it will be open until quitting 
    258         #the application. 
    259         f.close() 
    260  
    261         return not pdf.err 
    262  
    263          
    264          
     255        try: 
     256            from xhtml2pdf import pisa 
     257            # open output file for writing (truncated binary) 
     258            resultFile = open(filename, "w+b") 
     259            # convert HTML to PDF 
     260            pisaStatus = pisa.CreatePDF(data, dest=resultFile) 
     261            # close output file 
     262            resultFile.close() 
     263            self.Update() 
     264            return pisaStatus.err 
     265        except: 
     266            logging.error("Error creating pdf: %s" % sys.exc_value) 
     267        return False 
  • docs/sphinx-docs/source/user/user.rst

    r3702c12 r2b7d102  
    44.. toctree:: 
    55   :maxdepth: 1 
    6  
     6    
    77   Model Documentation <models/model_functions> 
    88    
     9   Data Formats <guiframe/data_formats_help> 
    910    
    1011   Loading Data <guiframe/data_explorer_help> 
    1112    
    1213   Plotting Data/Models <guiframe/graph_help> 
    13     
    1414    
    1515   Fitting Perspective <perspectives/fitting/fitting_help> 
     
    1919   Invariant Calculation Perspective <perspectives/invariant/invariant_help> 
    2020    
    21    
    2221   Data Operations Tool <perspectives/calculator/data_operator_help> 
    2322       
     
    3635   SANS Resolution Estimator Tool <perspectives/calculator/resolution_calculator_help> 
    3736    
    38     
    3937   Python Shell Tool <perspectives/calculator/python_shell_help> 
  • src/sas/models/media/model_functions.rst

    r98b30b4 rcd06a5f  
    8787 
    8888 2.1 Shape-based_ Functions 
     89  
    8990 2.2 Shape-independent_ Functions 
     91  
    9092 2.3 Structure-factor_ Functions 
     93  
    9194 2.4 Customised_ Functions 
    9295 
Note: See TracChangeset for help on using the changeset viewer.