Esempio n. 1
0
    def perform(self, event):
        from pyface.file_dialog import FileDialog
        dialog = FileDialog(action='save as', default_filename='IrradiationTemplate.xls')

        from pyface.constant import OK
        if dialog.open() == OK:
            path = dialog.path
            if path:
                from pychron.core.helpers.filetools import add_extension
                path = add_extension(path, '.xls')

                from pychron.entry.loaders.irradiation_template import IrradiationTemplate
                i = IrradiationTemplate()
                i.make_template(path)

                from pyface.confirmation_dialog import confirm
                if confirm(None, 'Template saved to {}.\n\nWould you like to open the template?'):
                    from pychron.core.helpers.filetools import view_file
                    application = 'Microsoft Office 2011/Microsoft Excel'
                    view_file(path, application=application)
Esempio n. 2
0
    def perform(self, event):
        from pyface.file_dialog import FileDialog
        dialog = FileDialog(action='save as',
                            default_filename='IrradiationTemplate.xls')

        from pyface.constant import OK
        if dialog.open() == OK:
            path = dialog.path
            if path:
                from pychron.core.helpers.filetools import add_extension
                path = add_extension(path, '.xls')

                from pychron.entry.loaders.irradiation_template import IrradiationTemplate
                i = IrradiationTemplate()
                i.make_template(path)

                from pyface.confirmation_dialog import confirm
                if confirm(
                        None,
                        'Template saved to {}.\n\nWould you like to open the template?'
                ):
                    from pychron.core.helpers.filetools import view_file
                    application = 'Microsoft Office 2011/Microsoft Excel'
                    view_file(path, application=application)
Esempio n. 3
0
    def make_template(self, p):
        from pychron.entry.loaders.irradiation_template import IrradiationTemplate

        i = IrradiationTemplate()
        i.make_template(p)
Esempio n. 4
0
    def make_template(self, p):
        from pychron.entry.loaders.irradiation_template import IrradiationTemplate

        i = IrradiationTemplate()
        i.make_template(p)