示例#1
0
def create_banner(message):
    """Create internal shell banner"""
    if message is None:
        versions = get_versions()
        return "Python %s %dbits [%s]" % (versions["python"], versions["bitness"], versions["system"])
    else:
        return message
示例#2
0
def create_banner(message):
    """Create internal shell banner"""
    if message is None:
        versions = get_versions()
        return 'Python %s %dbits [%s]'\
               % (versions['python'], versions['bitness'], versions['system'])
    else:
        return message
示例#3
0
def create_banner(message):
    """Create internal shell banner"""
    if message is None:
        versions = get_versions()
        return 'Python %s %dbits [%s]'\
               % (versions['python'], versions['bitness'], versions['system'])
    else:
        return message
示例#4
0
    print("02. Skipping GUI toolkit detection")
    os.environ['QT_API'] = options.gui

if options.debug:
    # safety check - Spyder config should not be imported at this point
    if "spyderlib.config.base" in sys.modules:
        sys.exit("ERROR: Can't enable debug mode - Spyder is already imported")
    print("0x. Switching debug mode on")
    os.environ["SPYDER_DEBUG"] = "True"
    # this way of interaction suxx, because there is no feedback
    # if operation is successful

# Checking versions (among other things, this has the effect of setting the
# QT_API environment variable if this has not yet been done just above)
from spyderlib import get_versions
versions = get_versions(reporev=False)
print("03. Imported Spyder %s" % versions['spyder'])
print("    [Python %s %dbits, Qt %s, %s %s on %s]" % \
      (versions['python'], versions['bitness'], versions['qt'],
       versions['qt_api'], versions['qt_api_ver'], versions['system']))

# Check that we have the right qtpy version
from spyderlib.utils import programs
if not programs.is_module_installed('qtpy', '>=1.1.0'):
    print("")
    sys.exit("ERROR: Your qtpy version is outdated. Please install qtpy "
             "1.1.0 or higher to be able to work with Spyder!")

# --- Executing Spyder

if not options.hide_console and os.name == 'nt':
示例#5
0
if options.debug:
    # safety check - Spyder config should not be imported at this point
    if "spyderlib.config.base" in sys.modules:
        sys.exit("ERROR: Can't enable debug mode - Spyder is already imported")
    print("0x. Switching debug mode on")
    os.environ["SPYDER_DEBUG"] = "True"
    # this way of interaction suxx, because there is no feedback
    # if operation is successful


# Checking versions (among other things, this has the effect of setting the
# QT_API environment variable if this has not yet been done just above)
from spyderlib import get_versions

versions = get_versions(reporev=False)
print("03. Imported Spyder %s" % versions["spyder"])
print(
    "    [Python %s %dbits, Qt %s, %s %s on %s]"
    % (
        versions["python"],
        versions["bitness"],
        versions["qt"],
        versions["qt_api"],
        versions["qt_api_ver"],
        versions["system"],
    )
)


# --- Executing Spyder