当前位置: 首页>>代码示例>>Python>>正文


Python Toolbox.Startup类代码示例

本文整理汇总了Python中Toolbox.Startup的典型用法代码示例。如果您正苦于以下问题:Python Startup类的具体用法?Python Startup怎么用?Python Startup使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了Startup类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: main

def main():
    """
    Main entry point into the application.
    """
    options = [
        ("--config=configDir",
         "use the given directory as the one containing the config files"),
        ("--settings=settingsDir",
         "use the given directory to store the settings files"),
    ]
    appinfo = AppInfo.makeAppInfo(sys.argv,
                                  "Eric6 TR Previewer",
                                  "file",
                                  "TR file previewer",
                                  options)
    
    # set the library paths for plugins
    Startup.setLibraryPaths()
    
    app = E5Application(sys.argv)
    client = TRSingleApplicationClient()
    res = client.connect()
    if res > 0:
        if len(sys.argv) > 1:
            client.processArgs(sys.argv[1:])
        sys.exit(0)
    elif res < 0:
        print("eric6_trpreviewer: {0}".format(client.errstr()))
        sys.exit(res)
    else:
        res = Startup.simpleAppStartup(sys.argv,
                                       appinfo,
                                       createMainWidget,
                                       app=app)
        sys.exit(res)
开发者ID:pycom,项目名称:EricShort,代码行数:35,代码来源:eric6_trpreviewer.py

示例2: main

def main():
    """
    Main entry point into the application.
    """
    options = [
        ("--config=configDir",
         "use the given directory as the one containing the config files"),
        ("--search=word", "search for the given word"),
        ("--settings=settingsDir",
         "use the given directory to store the settings files"),
    ]
    appinfo = AppInfo.makeAppInfo(sys.argv,
                                  "eric6 Web Browser",
                                  "file",
                                  "web browser",
                                  options)
    
    if not Globals.checkBlacklistedVersions():
        sys.exit(100)
    
    res = Startup.simpleAppStartup(sys.argv,
                                   appinfo,
                                   createMainWidget,
                                   installErrorHandler=True)
    sys.exit(res)
开发者ID:pycom,项目名称:EricShort,代码行数:25,代码来源:eric6_webbrowser.py

示例3: main

def main():
    """
    Main entry point into the application.
    """
    options = [("--config=configDir", "use the given directory as the one containing the config files")]
    appinfo = AppInfo.makeAppInfo(sys.argv, "Eric6 Unittest", "file", "Graphical unit test application", options)
    res = Startup.simpleAppStartup(sys.argv, appinfo, createMainWidget)
    sys.exit(res)
开发者ID:paulmadore,项目名称:Eric-IDE,代码行数:8,代码来源:eric6_unittest.py

示例4: main

def main():
    """
    Main entry point into the application.
    """
    options = [("--config=configDir", "use the given directory as the one containing the config files")]
    appinfo = AppInfo.makeAppInfo(sys.argv, "Eric6 Snap", "", "Simple utility to do snapshots of the screen.", options)
    res = Startup.simpleAppStartup(sys.argv, appinfo, createMainWidget)
    sys.exit(res)
开发者ID:paulmadore,项目名称:Eric-IDE,代码行数:8,代码来源:eric6_snap.py

示例5: main

def main():
    """
    Main entry point into the application.
    """
    options = [
        ("--config=configDir", "use the given directory as the one containing the config files"),
        ("--settings=settingsDir", "use the given directory to store the settings files"),
    ]
    appinfo = AppInfo.makeAppInfo(
        sys.argv, "Eric6 QRegularExpression", "", "Regexp editor for Qt's QRegularExpression class", options
    )
    res = Startup.simpleAppStartup(sys.argv, appinfo, createMainWidget)
    sys.exit(res)
开发者ID:testmana2,项目名称:test,代码行数:13,代码来源:eric6_qregularexpression.py

示例6: main

def main():
    """
    Main entry point into the application.
    """
    options = [("--config=configDir", "use the given directory as the one containing the config files")]
    appinfo = AppInfo.makeAppInfo(
        sys.argv,
        "Eric6 Plugin Repository",
        "",
        "Utility to show the contents of the eric6" " Plugin repository.",
        options,
    )
    res = Startup.simpleAppStartup(sys.argv, appinfo, createMainWidget)
    sys.exit(res)
开发者ID:testmana2,项目名称:eric,代码行数:14,代码来源:eric6_pluginrepository.py

示例7: main

def main():
    """
    Main entry point into the application.
    """
    options = [
        ("--config=configDir",
         "use the given directory as the one containing the config files"),
    ]
    appinfo = AppInfo.makeAppInfo(sys.argv,
                                  "Eric6 SQL Browser",
                                  "connection",
                                  "SQL browser",
                                  options)
    res = Startup.simpleAppStartup(sys.argv,
                                   appinfo,
                                   createMainWidget)
    sys.exit(res)
开发者ID:paulmadore,项目名称:Eric-IDE,代码行数:17,代码来源:eric6_sqlbrowser.py

示例8: main

def main():
    """
    Main entry point into the application.
    """
    options = [
        ("--config=configDir",
         "use the given directory as the one containing the config files"),
    ]
    appinfo = AppInfo.makeAppInfo(sys.argv,
                                  "Eric6 Compare",
                                  "",
                                  "Simple graphical compare tool",
                                  options)
    res = Startup.simpleAppStartup(sys.argv,
                                   appinfo,
                                   createMainWidget)
    sys.exit(res)
开发者ID:Darriall,项目名称:eric,代码行数:17,代码来源:eric6_compare.py

示例9: main

def main():
    """
    Main entry point into the application.
    """
    options = [
        ("--config=configDir",
         "use the given directory as the one containing the config files"),
        ("", "name of file to edit")
    ]
    appinfo = AppInfo.makeAppInfo(sys.argv,
                                  "Eric6 Icon Editor",
                                  "",
                                  "Little tool to edit icon files.",
                                  options)
    res = Startup.simpleAppStartup(sys.argv,
                                   appinfo,
                                   createMainWidget)
    sys.exit(res)
开发者ID:paulmadore,项目名称:Eric-IDE,代码行数:18,代码来源:eric6_iconeditor.py

示例10: main

def main():
    """
    Main entry point into the application.
    """
    options = [
        ("--config=configDir",
         "use the given directory as the one containing the config files"),
        ("--settings=settingsDir",
         "use the given directory to store the settings files"),
    ]
    appinfo = AppInfo.makeAppInfo(sys.argv,
                                  "Eric6 UI Previewer",
                                  "file",
                                  "UI file previewer",
                                  options)
    res = Startup.simpleAppStartup(sys.argv,
                                   appinfo,
                                   createMainWidget)
    sys.exit(res)
开发者ID:testmana2,项目名称:test,代码行数:19,代码来源:eric6_uipreviewer.py

示例11: main

def main():
    """
    Main entry point into the application.
    """
    options = [
        ("--config=configDir",
         "use the given directory as the one containing the config files"),
    ]
    appinfo = AppInfo.makeAppInfo(sys.argv,
                                  "Eric6 Tray",
                                  "",
                                  "Traystarter for eric6",
                                  options)
    res = Startup.simpleAppStartup(sys.argv,
                                   appinfo,
                                   createMainWidget,
                                   quitOnLastWindowClosed=False,
                                   raiseIt=False)
    sys.exit(res)
开发者ID:Darriall,项目名称:eric,代码行数:19,代码来源:eric6_tray.py

示例12: main

def main():
    """
    Main entry point into the application.
    """
    options = [
        ("--config=configDir",
         "use the given directory as the one containing the config files"),
        ("--settings=settingsDir",
         "use the given directory to store the settings files"),
        ("", "name of file to edit")
    ]
    appinfo = AppInfo.makeAppInfo(sys.argv,
                                  "Eric6 Editor",
                                  "",
                                  "Simplified version of the eric6 editor",
                                  options)
    res = Startup.simpleAppStartup(sys.argv,
                                   appinfo,
                                   createMainWidget)
    sys.exit(res)
开发者ID:pycom,项目名称:EricShort,代码行数:20,代码来源:eric6_editor.py

示例13: main

def main():
    """
    Main entry point into the application.
    
    @exception Exception re-raised for any exception occurring in the main
        program logic
    """
    from Globals import AppInfo
    import Globals
    
    global args, mainWindow, splash, restartArgs
    
    sys.excepthook = excepthook
    
    options = [
        ("--config=configDir",
         "use the given directory as the one containing the config files"),
        ("--debug", "activate debugging output to the console"),
        ("--nosplash", "don't show the splash screen"),
        ("--noopen",
         "don't open anything at startup except that given in command"),
        ("--plugin=plugin-file",
         "load the given plugin file (plugin development)"),
        ("--start-file", "load the most recently opened file"),
        ("--start-multi", "load the most recently opened multi-project"),
        ("--start-project", "load the most recently opened project"),
        ("--start-session", "load the global session file"),
        ("--",
         "indicate that there are options for the program to be debugged"),
        ("",
         "(everything after that is considered arguments for this program)")
    ]
    appinfo = AppInfo.makeAppInfo(sys.argv,
                                  "Eric6",
                                  "[project | files... [--] [debug-options]]",
                                  "A Python IDE",
                                  options)
    
    if not Globals.checkBlacklistedVersions():
        sys.exit(100)
    
    app = E5Application(sys.argv)
    
    from Toolbox import Startup
    ddindex = Startup.handleArgs(sys.argv, appinfo)
    
    logging.debug("Importing Preferences")
    import Preferences
    
    if Preferences.getUI("SingleApplicationMode"):
        handleSingleApplication(ddindex)
    
    # set the library paths for plugins
    Startup.setLibraryPaths()

    # set the search path for icons
    Startup.initializeResourceSearchPath()

    # generate and show a splash window, if not suppressed
    from UI.SplashScreen import SplashScreen, NoneSplashScreen
    if "--nosplash" in sys.argv and sys.argv.index("--nosplash") < ddindex:
        del sys.argv[sys.argv.index("--nosplash")]
        splash = NoneSplashScreen()
    elif not Preferences.getUI("ShowSplash"):
        splash = NoneSplashScreen()
    else:
        splash = SplashScreen()
    QCoreApplication.processEvents()

    # modify the executable search path for the PyQt5 installer
    if Globals.isWindowsPlatform():
        pyqtDataDir = Globals.getPyQt5ModulesDirectory()
        if os.path.exists(os.path.join(pyqtDataDir, "bin")):
            path = os.path.join(pyqtDataDir, "bin") + \
                os.pathsep + os.environ["PATH"]
        else:
            path = pyqtDataDir + os.pathsep + os.environ["PATH"]
        os.environ["PATH"] = path
    
    pluginFile = None
    noopen = False
    if "--noopen" in sys.argv and sys.argv.index("--noopen") < ddindex:
        del sys.argv[sys.argv.index("--noopen")]
        noopen = True
    for arg in sys.argv:
        if arg.startswith("--plugin=") and sys.argv.index(arg) < ddindex:
            import Utilities
            # extract the plugin development option
            pluginFile = arg.replace("--plugin=", "").replace('"', "")
            sys.argv.remove(arg)
            pluginFile = os.path.expanduser(pluginFile)
            pluginFile = Utilities.normabspath(pluginFile)
            break
    
    # is there a set of filenames or options on the command line,
    # if so, pass them to the UI
    if len(sys.argv) > 1:
        args = sys.argv[1:]
    
    # get the Qt4 translations directory
#.........这里部分代码省略.........
开发者ID:Darriall,项目名称:eric,代码行数:101,代码来源:eric6.py


注:本文中的Toolbox.Startup类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。