當前位置: 首頁>>代碼示例>>Python>>正文


Python LauncherBase.__init__方法代碼示例

本文整理匯總了Python中otp.launcher.LauncherBase.LauncherBase.__init__方法的典型用法代碼示例。如果您正苦於以下問題:Python LauncherBase.__init__方法的具體用法?Python LauncherBase.__init__怎麽用?Python LauncherBase.__init__使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在otp.launcher.LauncherBase.LauncherBase的用法示例。


在下文中一共展示了LauncherBase.__init__方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: __init__

# 需要導入模塊: from otp.launcher.LauncherBase import LauncherBase [as 別名]
# 或者: from otp.launcher.LauncherBase.LauncherBase import __init__ [as 別名]
    def __init__(self):
        if sys.argv[2] == 'Phase2.py':
            sys.argv = sys.argv[:1] + sys.argv[3:]
        if len(sys.argv) == 5 or len(sys.argv) == 6:
            self.gameServer = sys.argv[2]
            self.accountServer = sys.argv[3]
            self.testServerFlag = int(sys.argv[4])
        else:
            print 'Error: Launcher: incorrect number of parameters'
            sys.exit()

        self.toontownBlueKey = 'TOONTOWN_BLUE'
        self.toontownPlayTokenKey = 'TOONTOWN_PLAYTOKEN'
        self.launcherMessageKey = 'LAUNCHER_MESSAGE'
        self.game1DoneKey = 'GAME1_DONE'
        self.game2DoneKey = 'GAME2_DONE'
        self.tutorialCompleteKey = 'TUTORIAL_DONE'
        self.toontownRegistryKey = 'Software\\Disney\\Disney Online\\Toontown'
        if self.testServerFlag:
            self.toontownRegistryKey = '%s%s' % (self.toontownRegistryKey, 'Test')
        self.toontownRegistryKey = '%s%s' % (self.toontownRegistryKey, self.getProductName())
        LauncherBase.__init__(self)
        self.webAcctParams = 'WEB_ACCT_PARAMS'
        self.parseWebAcctParams()
        self.mainLoop()
開發者ID:Toonerz,項目名稱:Toontown-World-Online-Leaked-Source,代碼行數:27,代碼來源:ToontownLauncher.py

示例2: __init__

# 需要導入模塊: from otp.launcher.LauncherBase import LauncherBase [as 別名]
# 或者: from otp.launcher.LauncherBase.LauncherBase import __init__ [as 別名]
    def __init__(self):
        print 'Running: PiratesQuickLauncher'
        self.logPrefix = 'potcor-'

        ltime = 1 and time.localtime()
        logSuffix = '%02d%02d%02d_%02d%02d%02d' % (ltime[0] - 2000,  ltime[1], ltime[2],
                                                   ltime[3], ltime[4], ltime[5])

        
        if not os.path.exists('logs/'):
            os.mkdir('logs/')
            self.notify.info('Made new directory to save logs.')
        
        logfile = os.path.join('logs', self.logPrefix + logSuffix + '.log')

        log = open(logfile, 'a')
        logOut = LogAndOutput(sys.stdout, log)
        logErr = LogAndOutput(sys.stderr, log)
        sys.stdout = logOut
        sys.stderr = logErr
        self.heavyDownloadServerList = []
        self.heavyDownloadServer = None
        self.launcherFileDbFilename = '%s?%s' % (self.getValue('GAME_PATCHER_FILE_OPTIONS', 'patcher.ver'), random.randint(1, 1000000000))
        LauncherBase.__init__(self)
        self.contentDir = '/'
        self.serverDbFileHash = HashVal()
        self.launcherFileDbHash = HashVal()
        self.DECREASE_BANDWIDTH = 0
        self.httpChannel.setDownloadThrottle(0)
        self.showPhase = -1
        self.maybeStartGame()
        self.mainLoop()
開發者ID:TTGhost,項目名稱:POTCOR-src,代碼行數:34,代碼來源:PiratesQuickLauncher.py

示例3: __init__

# 需要導入模塊: from otp.launcher.LauncherBase import LauncherBase [as 別名]
# 或者: from otp.launcher.LauncherBase.LauncherBase import __init__ [as 別名]
 def __init__(self):
     print 'Running: PiratesQuickLauncher'
     self.heavyDownloadServerList = []
     self.heavyDownloadServer = None
     self.launcherFileDbFilename = '%s?%s' % (self.getValue('GAME_PATCHER_FILE_OPTIONS', 'patcher.ver'), random.randint(1, 1000000000))
     LauncherBase.__init__(self)
     self.contentDir = '/'
     self.serverDbFileHash = HashVal()
     self.launcherFileDbHash = HashVal()
     self.DECREASE_BANDWIDTH = 0
     self.httpChannel.setDownloadThrottle(0)
     self.showPhase = -1
     self.maybeStartGame()
     self.mainLoop()
開發者ID:XamarinDeveloper,項目名稱:Pirates-Online-Source,代碼行數:16,代碼來源:PiratesQuickLauncher.py

示例4: __init__

# 需要導入模塊: from otp.launcher.LauncherBase import LauncherBase [as 別名]
# 或者: from otp.launcher.LauncherBase.LauncherBase import __init__ [as 別名]
 def __init__(self):
     print 'Running: ToontownQuickLauncher'
     self.toontownBlueKey = 'TOONTOWN_BLUE'
     self.launcherMessageKey = 'LAUNCHER_MESSAGE'
     self.game1DoneKey = 'GAME1_DONE'
     self.game2DoneKey = 'GAME2_DONE'
     self.tutorialCompleteKey = 'TUTORIAL_DONE'
     LauncherBase.__init__(self)
     self.useTTSpecificLogin = config.GetBool('tt-specific-login', 0)
     self.toontownPlayTokenKey = 'TTI_PLAYCOOKIE'
     print 'useTTSpecificLogin=%s' % self.useTTSpecificLogin
     self.contentDir = '/'
     self.serverDbFileHash = HashVal()
     self.launcherFileDbHash = HashVal()
     self.DECREASE_BANDWIDTH = 0
     self.httpChannel.setDownloadThrottle(0)
     self.webAcctParams = 'WEB_ACCT_PARAMS'
     self.parseWebAcctParams()
     self.showPhase = -1
     self.maybeStartGame()
     self.mainLoop()
開發者ID:nate97,項目名稱:src,代碼行數:23,代碼來源:QuickLauncher.py


注:本文中的otp.launcher.LauncherBase.LauncherBase.__init__方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。