Exemple #1
0
 def createGeneralTab(self):
     aboutText = """
     {}<br><br>
     
     <b>Version info</b><br>
     IEP version: <u>{}</u><br>
     Platform: {}<br>
     Python version: {}<br>
     pyzolib version: {}<br>
     Qt version: {}<br>
     {} version: {}<br>
     <br>
     
     <b>IEP directories</b><br>
     IEP source directory: {}<br>
     IEP userdata directory: {}<br>
     <br>
     
     <b>Acknowledgements</b><br>
     IEP is written in Python 3 and uses the Qt widget
     toolkit. IEP uses code and concepts that are inspired by 
     IPython, Pype, and Spyder.
     IEP uses a (modified) subset of the silk icon set, 
     by Mark James (http://www.famfamfam.com/lab/icons/silk/).
     """
     # Determine license text
     licenseText = ''  # 'This copy of IEP is not registered (using the free license).'
     if iep.license:
         if iep.license['company']:
             licenseText = 'This copy of IEP is registered to {name} of {company}.'
         else:
             licenseText = 'This copy of IEP is registered to {name}.'
         licenseText = licenseText.format(**iep.license)
     # Determine if this is PyQt4 or Pyside
     if hasattr(QtCore, 'PYQT_VERSION_STR'):
         qtWrapper = 'PyQt4'
         qtVersion = QtCore.QT_VERSION_STR
         qtWrapperVersion = QtCore.PYQT_VERSION_STR
     else:
         import PySide
         qtWrapper = 'PySide'
         qtVersion = QtCore.__version__
         qtWrapperVersion = PySide.__version__
     # Insert information texts
     if paths.is_frozen():
         versionText = iep.__version__ + ' (binary)'
     else:
         versionText = iep.__version__ + ' (source)'
     aboutText = aboutText.format(licenseText, versionText, 
                     sys.platform, 
                     sys.version.split(' ')[0], 
                     pyzolib.__version__,
                     qtVersion, qtWrapper, qtWrapperVersion,
                     iep.iepDir, iep.appDataDir)
     
     self.addTab("General", aboutText)
Exemple #2
0
 def createGeneralTab(self):
     aboutText = """
     {}<br><br>
     
     <b>Version info</b><br>
     Pyzo version: <u>{}</u><br>
     Platform: {}<br>
     Python version: {}<br>
     pyzolib version: {}<br>
     Qt version: {}<br>
     {} version: {}<br>
     <br>
     
     <b>Pyzo directories</b><br>
     Pyzo source directory: {}<br>
     Pyzo userdata directory: {}<br>
     <br>
     
     <b>Acknowledgements</b><br>
     Pyzo is written in Python 3 and uses the Qt widget
     toolkit. Pyzo uses code and concepts that are inspired by 
     IPython, Pype, and Spyder.
     Pyzo uses a (modified) subset of the silk icon set, 
     by Mark James (http://www.famfamfam.com/lab/icons/silk/).
     """
     # Determine if this is PyQt4 or Pyside
     if hasattr(QtCore, 'PYQT_VERSION_STR'):
         qtWrapper = 'PyQt4'
         qtVersion = QtCore.QT_VERSION_STR
         qtWrapperVersion = QtCore.PYQT_VERSION_STR
     else:
         import PySide
         qtWrapper = 'PySide'
         qtVersion = QtCore.__version__
         qtWrapperVersion = PySide.__version__
     # Insert information texts
     if paths.is_frozen():
         versionText = pyzo.__version__ + ' (binary)'
     else:
         versionText = pyzo.__version__ + ' (source)'
     aboutText = aboutText.format('Pyzo - Python to the people!' ,
                     versionText, 
                     sys.platform, 
                     sys.version.split(' ')[0], 
                     pyzolib.__version__,
                     qtVersion, qtWrapper, qtWrapperVersion,
                     pyzo.pyzoDir, pyzo.appDataDir)
     
     self.addTab("General", aboutText)
Exemple #3
0
    def createGeneralTab(self):
        aboutText = """
        {}<br><br>
        
        <b>Version info</b><br>
        Pyzo version: <u>{}</u><br>
        Platform: {}<br>
        Python version: {}<br>
        pyzolib version: {}<br>
        Qt version: {}<br>
        {} version: {}<br>
        <br>
        
        <b>Pyzo directories</b><br>
        Pyzo source directory: {}<br>
        Pyzo userdata directory: {}<br>
        <br>
        
        <b>Acknowledgements</b><br>
        Pyzo is written in Python 3 and uses the Qt widget
        toolkit. Pyzo uses code and concepts that are inspired by 
        IPython, Pype, and Spyder.
        Pyzo uses a (modified) subset of the silk icon set, 
        by Mark James (http://www.famfamfam.com/lab/icons/silk/).
        """
        # Determine if this is PyQt4 or Pyside
        if hasattr(QtCore, 'PYQT_VERSION_STR'):
            qtWrapper = 'PyQt4'
            qtVersion = QtCore.QT_VERSION_STR
            qtWrapperVersion = QtCore.PYQT_VERSION_STR
        else:
            import PySide
            qtWrapper = 'PySide'
            qtVersion = QtCore.__version__
            qtWrapperVersion = PySide.__version__
        # Insert information texts
        if paths.is_frozen():
            versionText = pyzo.__version__ + ' (binary)'
        else:
            versionText = pyzo.__version__ + ' (source)'
        aboutText = aboutText.format('Pyzo - Python to the people!',
                                     versionText, sys.platform,
                                     sys.version.split(' ')[0],
                                     pyzolib.__version__, qtVersion, qtWrapper,
                                     qtWrapperVersion, pyzo.pyzoDir,
                                     pyzo.appDataDir)

        self.addTab("General", aboutText)
def install(**kwargs):
    """ install(**kwargs)
    
    Install the Cython importer. Call this every time before importing
    a Cython module. The code is recompiled if necessary.
    
    For simple code, one just needs to call install(). For more advanced
    code, use the keyword arguments to specify language, include dirs etc.
    This makes setup scripts unnecessary in many cases.
    
    Keyword arguments
    -----------------
    compiler : {'gcc', 'native'}
        On Windows, use this to specify the compiler. Default gcc.
    language : {'c', 'c++'}
        Language to compile the Cython code to. Default c.
    include_dirs : list
        List of directories to find header files. The list is extended with
        numpy header files.
    library_dirs : list
        List of directories to find libraries.
    libraries : list
        Names of libraries to link to.
    extra_compile_args : list
        Extra compile arguments. '-O2' is added by default, and when using
        gcc, some flags to distinguish 32bit/64bit code.
    extra_link_args : list
        Extra link arguments. When using gcc, some flags to distinguish 
        32bit/64bit code.
    
    """
    
    # NOTE: The kwargs are passed to all stages of the compile tree. 
    # Every function can pick from it what it needs.
    
    # Never try to compile if we are in a frozen app
    if paths.is_frozen():
        return
    
    # Prevent double installation -> uninstall any current importers
    for importer in [i for i in sys.meta_path]:
        if isinstance(importer, Importer):
            importer.uninstall()
    
    # Install new importer
    sys.meta_path.insert(0, Importer(kwargs))
Exemple #5
0
    def restart(self):
        """ Restart IEP. """

        self._closeflag = time.time()

        # Close
        self.close()

        if self._closeflag:
            # Get args
            args = [arg for arg in sys.argv]

            if not paths.is_frozen():
                # Prepend the executable name (required on Linux)
                lastBit = os.path.basename(sys.executable)
                args.insert(0, lastBit)

            # Replace the process!
            os.execv(sys.executable, args)
Exemple #6
0
 def restart(self):
     """ Restart IEP. """
     
     self._closeflag = time.time()
     
     # Close
     self.close()
     
     if self._closeflag:
         # Get args
         args = [arg for arg in sys.argv]
         
         if not paths.is_frozen():
             # Prepend the executable name (required on Linux)
             lastBit = os.path.basename(sys.executable)
             args.insert(0, lastBit)
         
         # Replace the process!
         os.execv(sys.executable, args)