def show_version(): print("[Pyslvs " + version_number + "]", "Python Version: {0:d}.{1:d}.{2:d}".format(*version_info[:3])) try: try: from PyQt5.QtCore import qVersion except: from PyQt4.QtCore import qVersion print("Qt Version: {0}".format(qVersion().strip())) except: print("No Qt.") try: try: from PyQt5.QtCore import PYQT_VERSION_STR as pyqtVersion except: from PyQt4.QtCore import PYQT_VERSION_STR as pyqtVersion print("PyQt Version:", pyqtVersion.strip()) except: print("No PyQt.") try: from sip import SIP_VERSION_STR as sipVersion print("Sip Version:", sipVersion.strip()) except: print("No Sip.") try: try: from PyQt5.Qsci import QSCINTILLA_VERSION_STR as qsciVersion except: from PyQt4.Qsci import QSCINTILLA_VERSION_STR as qsciVersion print("QScintilla Version:", qsciVersion.strip()) except: print("No QScintilla.") print("-------")
##but WITHOUT ANY WARRANTY; without even the implied warranty of ##MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ##GNU Affero General Public License for more details. ## ##You should have received a copy of the GNU Affero General Public License ##along with this program; if not, write to the Free Software ##Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. from sys import version_info import platform import argparse import requests try: from PyQt5.QtCore import qVersion, PYQT_VERSION_STR Qt_Version = qVersion().strip() PyQt_Version = PYQT_VERSION_STR.strip() except ImportError: Qt_Version = "No Qt" PyQt_Version = "No PyQt" VERSION = (18, 2, 0, 'release') INFO = ( "Pyslvs {}.{}.{}({})".format(*VERSION), "OS Type: {} {} [{}]".format(platform.system(), platform.release(), platform.machine()), "Python Version: {v.major}.{v.minor}.{v.micro}({v.releaselevel})".format( v=version_info), "Python Compiler: {}".format( platform.python_compiler()), "Qt Version: {}".format(Qt_Version), "PyQt Version: {}".format(PyQt_Version))