def restart(self): """ Restart Pyzo. """ 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) # When running from the pip entry point pyzo.exe ... (issue #641) if len(args ) == 2 and args[0] == "python.exe" and not os.path.isfile( args[1]): args = ["python.exe", "-m", "pyzo"] # Replace the process! os.execv(sys.executable, args)
def createGeneralTab(self): aboutText = """ {}<br><br> <b>Version info</b><br> Pyzo version: <u>{}</u><br> Platform: {}<br> Python version: {}<br> Qt version: {}<br> {} version: {}<br> <br> <b>Pyzo directories</b><br> Pyzo source directory: {}<br> Pyzo config directory: {}<br> Pyzo userdata directory: {}<br> <br> <b>License</b><br> Pyzo is open source, it's code is distributed under the 2-Clause BSD license. <br><br> <b>Contributors</b><br> Pyzo is coded with ♥ by Almar Klein and over 30 contributors:<br> https://github.com/pyzo/pyzo/graphs/contributors <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 PyQt or Pyside qtWrapper = qt.API_NAME qtVersion = qt.QT_VERSION qtWrapperVersion = qt.PYSIDE_VERSION or qt.PYQT_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], qtVersion, qtWrapper, qtWrapperVersion, pyzo.pyzoDir, pyzo.appConfigDir, pyzo.appDataDir, ) self.addTab("General", aboutText)
def createGeneralTab(self): aboutText = """ {}<br><br> <b>Version info</b><br> Pyzo version: <u>{}</u><br> Platform: {}<br> Python 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], qtVersion, qtWrapper, qtWrapperVersion, pyzo.pyzoDir, pyzo.appDataDir) self.addTab("General", aboutText)
def restart(self): """ Restart Pyzo. """ 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)
def createGeneralTab(self): aboutText = """ {}<br><br> <b>Version info</b><br> Pyzo version: <u>{}</u><br> Platform: {}<br> Python 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 qtWrapper = qt.API_NAME qtVersion = qt.QT_VERSION qtWrapperVersion = qt.PYSIDE_VERSION or qt.PYQT_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], qtVersion, qtWrapper, qtWrapperVersion, pyzo.pyzoDir, pyzo.appDataDir) self.addTab("General", aboutText)