Çözüldü Girişte account kaydı

  • Konuyu açan Konuyu açan gurkoo
  • Açılış Tarihi Açılış Tarihi
  • Yanıt Yanıt 18
  • Gösterim Gösterim 2K
Bu konu çözüme ulaştırılmıştır. Çözüm için konuya yazılan tüm yorumları okumayı unutmayın. Eğer konudaki yorumlar sorununuzu çözmediyse yeni bir konu açabilirsiniz.
Durum
İçerik kilitlendiği için mesaj gönderimine kapatıldı.

gurkoo

Üye
Üye
Mesaj
50
Çözümler
3
Beğeni
13
Puan
46
Ticaret Puanı
0
Linkleri görebilmek için giriş yap veya kayıt ol.


Arkadaşlar autopatcher yaptım yapmadan önce deneme amaçlı asd adında slot kaydetmiştim.Site FTP'ye autopatcher dosyalarını attım her girişte ne kaydetsemde geri "asd" adlı slota geri dönüyor Site FTP'si üzerinden hangi dosyayı silersem bu sorunu çözebilirim account.ini dosyasını bulamadım.
 
Çözüm
Yok onu upload edin. Sistemin çalışması için gerekli.
Galiba hangi dosyaya kayıt olduğunu buldum. intrologin.py dosyanızı biraz daha inceledim ve python2222.dll şu dosyanın içine kayıt oluyor. Bunu otopack crclist içinden çıkartınız.
Hesap kayıt sisteminiz hangi dosyaya kayıt ediyorsa onu otopack listesinden kaldırınız.
Birde resimleri foruma yükleyin lütfen.
 
Hesap kayıt sisteminiz hangi dosyaya kayıt ediyorsa onu otopack listesinden kaldırınız.
Birde resimleri foruma yükleyin lütfen.

Peki hesap kayıt sistemimin hangi dosyaya kayıt ettiğini nereden öğrenebilirim bunun bir yolu var mı files benim olmadığı için bilmiyorum.
tabiki foruma yüklerim bundan sonra
 
Merhaba.

Root.epk içerisinde intrologin.py var o dosyanın içinde kullanıcı verilerini bulabilirsin eğer orda yoksa cliente logindata olarak kayıtlıdır.​
 
intrologin içinde böyle bir yer var burdan değiştireceğim birşey varmı
 

Dosya Eklentileri

  • sadas.webp
    sadas.webp
    57,8 KB · Gösterim: 253
Hayır değiştirmeniz gereken bir kısım yok sistemiz çalışıyor ve sizde öyle kalsın istiyorsunuz tek sorununuz kaydettiğiniz kullanıcı eğer loglar içinde gözükmüyorsa ve sizin kendi şahsi sisteminizde ise gözüken kısım diğer playerlar da gözükmeyecektir şayet upload edicekseniz packinizi kullanıcı girişlerindeki loglardan 'asdad' kısmını silmeniz gerekiyor böylelikle kullanıcı kaydetme kısmı boşalıcaktır attığınız görsel sadece sistemin aktif olduğunu söylüyor herhangi bir kullanıcı logu yok.
 
@gurkoo insanların kodlar üzerinde rahat okuması ve düzenleme yapabilmesi için kodlarınızı kod bloguna ekleyebilirsiniz. Bu tarz konularda resimleri daha çok sorunun neden olduğu sonucu göstermek için kullanılıyor. Lütfen önceki mesajlarınızda resimle paylaştığınız kodları ekleyiniz.
 
intrologin.py içinde ki tüm kodlarınızı paylaşabilir misiniz?
 
intrologin.py içinde ki tüm kodlarınızı paylaşabilir misiniz?

Tabiki buyrun
Python:
Genişlet Daralt Kopyala
import dbg
import app
import net
import ui
import ime
import snd
import wndMgr
import musicInfo
import serverInfo
import systemSetting
import ServerStateChecker
import localeInfo
import constInfo
import uiCommon
import time
import ServerCommandParser
import ime
import uiScriptLocale
import background
import base64

#/* Hesap Kayıt sistemi //HESAPKAYITSISTEM // 15.10.17 - 23:56 */
if constInfo.ACCOUNT_REGISTER_ENABLE:
    import configparser
    account_parser = configparser.ConfigParser()

LOGIN_DELAY_SEC = 0.0
SKIP_LOGIN_PHASE = FALSE
SKIP_LOGIN_PHASE_SUPPORT_CHANNEL = FALSE
FULL_BACK_IMAGE = FALSE

PASSPOD_MSG_DICT = {}

VIRTUAL_KEYBOARD_NUM_KEYS = 46
VIRTUAL_KEYBOARD_RAND_KEY = FALSE

def Suffle(src):
    if VIRTUAL_KEYBOARD_RAND_KEY:
        items = [item for item in src]

        itemCount = len(items)
        for oldPos in xrange(itemCount):
            newPos = app.GetRandom(0, itemCount-1)
            items[newPos], items[oldPos] = items[oldPos], items[newPos]

        return "".join(items)
    else:
        return src

if localeInfo.IsYMIR():
    FULL_BACK_IMAGE = TRUE

def IsFullBackImage():
    global FULL_BACK_IMAGE
    return FULL_BACK_IMAGE

def IsLoginDelay():
    global LOGIN_DELAY_SEC
    if LOGIN_DELAY_SEC > 0.0:
        return TRUE
    else:
        return FALSE

def GetLoginDelay():
    global LOGIN_DELAY_SEC
    return LOGIN_DELAY_SEC

app.SetGuildMarkPath("test")

class ConnectingDialog(ui.ScriptWindow):

    def __init__(self):
        ui.ScriptWindow.__init__(self)
        self.__LoadDialog()
        self.eventTimeOver = lambda *arg: None
        self.eventExit = lambda *arg: None

    def __del__(self):
        ui.ScriptWindow.__del__(self)

    def __LoadDialog(self):
        try:
            PythonScriptLoader = ui.PythonScriptLoader()
            PythonScriptLoader.LoadScriptFile(self, "UIScript/ConnectingDialog.py")

            self.board = self.GetChild("board")
            self.message = self.GetChild("message")
            self.countdownMessage = self.GetChild("countdown_message")

        except:
            import exception
            exception.Abort("ConnectingDialog.LoadDialog.BindObject")

    def Open(self, waitTime):
        curTime = time.clock()
        self.endTime = curTime + waitTime

        self.Lock()
        self.SetCenterPosition()
        self.SetTop()
        self.Show()

    def Close(self):
        self.Unlock()
        self.Hide()

    def Destroy(self):
        self.Hide()
        self.ClearDictionary()

    def SetText(self, text):
        self.message.SetText(text)

    def SetCountDownMessage(self, waitTime):
        self.countdownMessage.SetText("%.0f%s" % (waitTime, localeInfo.SECOND))

    def SAFE_SetTimeOverEvent(self, event):
        self.eventTimeOver = ui.__mem_func__(event)

    def SAFE_SetExitEvent(self, event):
        self.eventExit = ui.__mem_func__(event)

    def OnUpdate(self):
        lastTime = max(0, self.endTime - time.clock())
        if 0 == lastTime:
            self.Close()
            self.eventTimeOver()
        else:
            self.SetCountDownMessage(self.endTime - time.clock())

    def OnPressExitKey(self):
        #self.eventExit()
        return TRUE

class LoginWindow(ui.ScriptWindow):

    IS_TEST = net.IsTest()

    def __init__(self, stream):
        print "NEW LOGIN WINDOW  ----------------------------------------------------------------------------"
        ui.ScriptWindow.__init__(self)
        net.SetPhaseWindow(net.PHASE_WINDOW_LOGIN, self)
        net.SetAccountConnectorHandler(self)

        #/* Yeni Random Login Arkaplanı // LOGINRANDOMARKAPLAN // 10.10.2017 - 18:20 */
        if constInfo.NEW_ENABLE_BACKGROUND:
            self.backgroundImage = 0
          
        self.lastLoginTime = 0
        #/* Hesap Kayıt sistemi //HESAPKAYITSISTEM // 15.10.17 - 23:56 */
        if constInfo.ACCOUNT_REGISTER_ENABLE:
            self.isDeletingAccount = False
          
        self.inputDialog = None
        self.connectingDialog = None
        self.stream=stream
        self.isNowCountDown=FALSE
        self.isStartError=FALSE

        self.xServerBoard = 0
        self.yServerBoard = 0
      
        self.loadingImage = None

        self.virtualKeyboard = None
        self.virtualKeyboardMode = "ALPHABET"
        self.virtualKeyboardIsUpper = FALSE
      
    def __del__(self):
        net.ClearPhaseWindow(net.PHASE_WINDOW_LOGIN, self)
        net.SetAccountConnectorHandler(0)
        ui.ScriptWindow.__del__(self)
        print "---------------------------------------------------------------------------- DELETE LOGIN WINDOW"

    def Open(self):
        ServerStateChecker.Create(self)

        print "LOGIN WINDOW OPEN ----------------------------------------------------------------------------"

        self.loginFailureMsgDict={
            #"DEFAULT" : locale.LOGIN_FAILURE_UNKNOWN,

            "ALREADY"    : localeInfo.LOGIN_FAILURE_ALREAY,
            "NOID"        : localeInfo.LOGIN_FAILURE_NOT_EXIST_ID,
            "WRONGPWD"    : localeInfo.LOGIN_FAILURE_WRONG_PASSWORD,
            "FULL"        : localeInfo.LOGIN_FAILURE_TOO_MANY_USER,
            "SHUTDOWN"    : localeInfo.LOGIN_FAILURE_SHUTDOWN,
            "REPAIR"    : localeInfo.LOGIN_FAILURE_REPAIR_ID,
            "BLOCK"        : localeInfo.LOGIN_FAILURE_BLOCK_ID,
            "WRONGMAT"    : localeInfo.LOGIN_FAILURE_WRONG_MATRIX_CARD_NUMBER,
            "QUIT"        : localeInfo.LOGIN_FAILURE_WRONG_MATRIX_CARD_NUMBER_TRIPLE,
            "BESAMEKEY"    : localeInfo.LOGIN_FAILURE_BE_SAME_KEY,
            "NOTAVAIL"    : localeInfo.LOGIN_FAILURE_NOT_AVAIL,
            "NOBILL"    : localeInfo.LOGIN_FAILURE_NOBILL,
            "BLKLOGIN"    : localeInfo.LOGIN_FAILURE_BLOCK_LOGIN,
            "WEBBLK"    : localeInfo.LOGIN_FAILURE_WEB_BLOCK,
            "NMIP"        : localeInfo.LOGIN_FAILURE_NOT_MATCH_IP,
            "IPBAN"        : localeInfo.LOGIN_FAILURE_BLOCK_IP,
            "GUVENLIP"    : localeInfo.LOGIN_FAILURE_NOT_MATCH_MAC,
            "GUVENLIPC"    : localeInfo.LOGIN_FAILURE_NOT_MATCH_MAC,
            "MACBAN"    : localeInfo.LOGIN_FAILURE_BLOCK_MAC,
            "NOMOBIL"    : "Oyunun sitesi üzerinden telefon aktivasyonu yapılmamış",
            "VERSION"    : "İstemci sürümü eski lütfen patcher güncellemesi yapınız",
            "HWID"        : "Güvenli Bilgisayar dışında giriş yapamazsınız",
            "HWIDBAN"    : "HWID tarafından banlandınız!",
        }

        self.loginFailureFuncDict = {
            "WRONGPWD"    : self.__DisconnectAndInputPassword,
            #"WRONGMAT"    : self.__DisconnectAndInputMatrix,
            "QUIT"        : app.Exit,
        }

        self.SetSize(wndMgr.GetScreenWidth(), wndMgr.GetScreenHeight())
        self.SetWindowName("LoginWindow")

        if not self.__LoadScript(uiScriptLocale.LOCALE_UISCRIPT_PATH + "LoginWindow.py"):
            dbg.TraceError("LoginWindow.Open - __LoadScript Error")
            return
      
        self.__LoadLoginInfo("MmoVaktiInfo.py")
      
        if app.loggined:
            self.loginFailureFuncDict = {
            "WRONGPWD"    : app.Exit,
            "WRONGMAT"    : app.Exit,
            "QUIT"        : app.Exit,
            }

        if musicInfo.loginMusic != "":
            snd.SetMusicVolume(systemSetting.GetMusicVolume())
            snd.FadeInMusic("BGM/"+musicInfo.loginMusic)

        snd.SetSoundVolume(systemSetting.GetSoundVolume())

        # pevent key "[" "]"
        ime.AddExceptKey(91)
        ime.AddExceptKey(93)
          
        self.Show()

        global SKIP_LOGIN_PHASE
        if SKIP_LOGIN_PHASE:
            if self.isStartError:
                self.connectBoard.Hide()
                self.loginBoard.Hide()
                self.serverBoard.Hide()
              
                #/* Hesap Kayıt sistemi //HESAPKAYITSISTEM // 15.10.17 - 23:56 */
                if constInfo.ACCOUNT_REGISTER_ENABLE:
                    self.ChannelAccountManager.Hide()
                  
                self.PopupNotifyMessage(localeInfo.LOGIN_CONNECT_FAILURE, self.__ExitGame)
                return

            if self.loginInfo:
                self.serverBoard.Hide()
            else:
                self.__RefreshServerList()
                self.__OpenServerBoard()
        else:
            connectingIP = self.stream.GetConnectAddr()
            if connectingIP:
                self.__OpenLoginBoard()
            else:
                self.__RefreshServerList()
                self.__OpenServerBoard()

        app.ShowCursor()
      
        #/* Hesap Kayıt sistemi //HESAPKAYITSISTEM // 15.10.17 - 23:56 */
        if constInfo.ACCOUNT_REGISTER_ENABLE:
            self.AccountDeleteAbort.Hide()
            self.RefreshAccounts()

    def Close(self):

        if self.connectingDialog:
            self.connectingDialog.Close()
        self.connectingDialog = None

        ServerStateChecker.Initialize(self)

        print "---------------------------------------------------------------------------- CLOSE LOGIN WINDOW "
        #
        # selectMusicÀÌ ¾øÀ¸¸é BGMÀÌ ²÷±â¹Ç·Î µÎ°³ ´Ù üũÇÑ´Ù.
        #
        if musicInfo.loginMusic != "" and musicInfo.selectMusic != "":
            snd.FadeOutMusic("BGM/"+musicInfo.loginMusic)

        ## NOTE : idEditLine¿Í pwdEditLineÀº À̺¥Æ®°¡ ¼·Î ¿¬°á µÇ¾îÀÖ¾î¼
        ##        Event¸¦ °Á¦·Î ÃʱâÈ ÇØÁÖ¾î¾ß¸¸ ÇÕ´Ï´Ù - [levites]
        self.idEditLine.SetTabEvent(0)
        self.idEditLine.SetReturnEvent(0)
        self.pwdEditLine.SetReturnEvent(0)
        self.pwdEditLine.SetTabEvent(0)

        self.connectBoard = None
        self.loginBoard = None
      
        #/* Hesap Kayıt sistemi //HESAPKAYITSISTEM // 15.10.17 - 23:56 */
        if constInfo.ACCOUNT_REGISTER_ENABLE:
            self.ChannelAccountManager = None
      
        self.idEditLine = None
        self.pwdEditLine = None
        self.inputDialog = None
        self.connectingDialog = None
        self.loadingImage = None

        self.serverBoard                = None
        self.serverList                    = None
        self.channelList                = None

        self.VIRTUAL_KEY_ALPHABET_LOWERS = None
        self.VIRTUAL_KEY_ALPHABET_UPPERS = None
        self.VIRTUAL_KEY_SYMBOLS = None
        self.VIRTUAL_KEY_NUMBERS = None

        # VIRTUAL_KEYBOARD_BUG_FIX
        if self.virtualKeyboard:
            for keyIndex in xrange(0, VIRTUAL_KEYBOARD_NUM_KEYS+1):
                key = self.GetChild2("key_%d" % keyIndex)
                if key:
                    key.SetEvent(None)

            self.GetChild("key_space").SetEvent(None)
            self.GetChild("key_backspace").SetEvent(None)
            self.GetChild("key_enter").SetEvent(None)
            self.GetChild("key_shift").SetToggleDownEvent(None)
            self.GetChild("key_shift").SetToggleUpEvent(None)
            self.GetChild("key_at").SetToggleDownEvent(None)
            self.GetChild("key_at").SetToggleUpEvent(None)

            self.virtualKeyboard = None

        self.KillFocus()
        self.Hide()
      
        #/* Hesap Kayıt sistemi //HESAPKAYITSISTEM // 15.10.17 - 23:56 */
        if constInfo.ACCOUNT_REGISTER_ENABLE:
            self.isDeletingAccount = False
      
        #/* Yeni Random Login Arkaplanı // LOGINRANDOMARKAPLAN // 10.10.2017 - 18:20 */
        if constInfo.NEW_ENABLE_BACKGROUND:
            self.backgroundImage = 0
          
        self.stream.popupWindow.Close()
        self.loginFailureFuncDict=None

        ime.ClearExceptKey()

        app.HideCursor()

    def __SaveChannelInfo(self):
        try:
            file=open("channel.inf", "w")
            file.write("%d %d %d" % (self.__GetServerID(), self.__GetChannelID(), self.__GetRegionID()))
        except:
            print "LoginWindow.__SaveChannelInfo - SaveError"

    def __LoadChannelInfo(self):
        try:
            file=open("channel.inf")
            lines=file.readlines()
          
            if len(lines)>0:
                tokens=lines[0].split()

                selServerID=int(tokens[0])
                selChannelID=int(tokens[1])
              
                if len(tokens) == 3:
                    regionID = int(tokens[2])

                return regionID, selServerID, selChannelID

        except:
            print "LoginWindow.__LoadChannelInfo - OpenError"
            return -1, -1, -1

    def __ExitGame(self):
        app.Exit()

    def SetIDEditLineFocus(self):
        if self.idEditLine != None:
            self.idEditLine.SetFocus()

    def SetPasswordEditLineFocus(self):
        if localeInfo.IsEUROPE():
            if self.idEditLine != None: #0000862: [M2EU] ·Î±×ÀÎâ Æ˾÷ ¿¡·¯: Á¾·á½Ã ¸ÕÀú None ¼³Á¤µÊ
                self.idEditLine.SetText("")
                self.idEditLine.SetFocus() #0000685: [M2EU] ¾ÆÀ̵ğ/ºñ¹Ğ¹øÈ£ À¯Ãß °¡´É ¹ö±× ¼öÁ¤: ¹«Á¶°Ç ¾ÆÀ̵ğ·Î Æ÷Ä¿½º°¡ °¡°Ô ¸¸µç´Ù

            if self.pwdEditLine != None: #0000862: [M2EU] ·Î±×ÀÎâ Æ˾÷ ¿¡·¯: Á¾·á½Ã ¸ÕÀú None ¼³Á¤µÊ
                self.pwdEditLine.SetText("")
        else:
            if self.pwdEditLine != None:
                self.pwdEditLine.SetFocus()                              

    def OnEndCountDown(self):
        self.isNowCountDown = FALSE
        self.OnConnectFailure()

    def OnConnectFailure(self):

        if self.isNowCountDown:
            return

        snd.PlaySound("sound/ui/loginfail.wav")

        if self.connectingDialog:
            self.connectingDialog.Close()
        self.connectingDialog = None

        if app.loggined:
            self.PopupNotifyMessage(localeInfo.LOGIN_CONNECT_FAILURE, self.__ExitGame)
        else:
            self.PopupNotifyMessage(localeInfo.LOGIN_CONNECT_FAILURE, self.SetPasswordEditLineFocus)

    def OnHandShake(self):
        if not IsLoginDelay():
            snd.PlaySound("sound/ui/loginok.wav")
            self.PopupDisplayMessage(localeInfo.LOGIN_CONNECT_SUCCESS)

    def OnLoginStart(self):
        if not IsLoginDelay():
            self.PopupDisplayMessage(localeInfo.LOGIN_PROCESSING)

    def OnLoginFailure(self, error):
        if self.connectingDialog:
            self.connectingDialog.Close()
        self.connectingDialog = None

        try:
            loginFailureMsg = self.loginFailureMsgDict[error]
        except KeyError:
            if PASSPOD_MSG_DICT:
                try:
                    loginFailureMsg = PASSPOD_MSG_DICT[error]
                except KeyError:
                    loginFailureMsg = localeInfo.LOGIN_FAILURE_UNKNOWN + error
            else:
                loginFailureMsg = localeInfo.LOGIN_FAILURE_UNKNOWN  + error


        #0000685: [M2EU] ¾ÆÀ̵ğ/ºñ¹Ğ¹øÈ£ À¯Ãß °¡´É ¹ö±× ¼öÁ¤: ¹«Á¶°Ç Æнº¿öµå·Î Æ÷Ä¿½º°¡ °¡°Ô ¸¸µç´Ù
        loginFailureFunc=self.loginFailureFuncDict.get(error, self.SetPasswordEditLineFocus)

        if app.loggined:
            self.PopupNotifyMessage(loginFailureMsg, self.__ExitGame)
        else:
            self.PopupNotifyMessage(loginFailureMsg, loginFailureFunc)
            #self.PopupDialog = uiCommon.PopupDialog()
            #self.PopupDialog.SetText(loginFailureMsg)
            #w,h = self.PopupDialog.GetTextSize()
            #self.PopupDialog.SetWidth(w + 60)
            #self.PopupDialog.Close()
            #self.PopupDialog.Open()

        snd.PlaySound("sound/ui/loginfail.wav")

    def __DisconnectAndInputID(self):
        if self.connectingDialog:
            self.connectingDialog.Close()
        self.connectingDialog = None

        self.SetIDEditLineFocus()
        net.Disconnect()

    def __DisconnectAndInputPassword(self):
        if self.connectingDialog:
            self.connectingDialog.Close()
        self.connectingDialog = None

        self.SetPasswordEditLineFocus()
        net.Disconnect()

    def __LoadScript(self, fileName):
        try:
            pyScrLoader = ui.PythonScriptLoader()
            pyScrLoader.LoadScriptFile(self, fileName)
        except:
            import exception
            exception.Abort("LoginWindow.__LoadScript.LoadObject")

        try:
            GetObject = self.GetChild
            #/* Yeni Random Login Arkaplanı // LOGINRANDOMARKAPLAN // 10.10.2017 - 18:20 */
            if constInfo.NEW_ENABLE_BACKGROUND:
                self.backgroundImage        = GetObject("BackGround")
            self.serverBoard            = GetObject("ServerBoard")
            self.serverList                = GetObject("ServerList")
            self.channelList            = GetObject("ChannelList")
            self.serverSelectButton        = GetObject("ServerSelectButton")
            self.serverExitButton        = GetObject("ServerExitButton")
            self.connectBoard            = GetObject("ConnectBoard")
            self.loginBoard                = GetObject("LoginBoard")
            self.idEditLine                = GetObject("ID_EditLine")
            self.pwdEditLine            = GetObject("Password_EditLine")
            self.serverInfo                = GetObject("ConnectName")
            self.selectConnectButton    = GetObject("SelectConnectButton")
            self.loginButton            = GetObject("LoginButton")
            self.loginExitButton        = GetObject("LoginExitButton")
          
            #/* Hesap Kayıt sistemi //HESAPKAYITSISTEM // 15.10.17 - 23:56 */
            if constInfo.ACCOUNT_REGISTER_ENABLE:
                self.ChannelAccountManager    = GetObject("ChannelAccountManager")
                self.acc1loginButton        = GetObject('Acc1Login')
                self.acc2loginButton        = GetObject('Acc2Login')
                self.acc3loginButton        = GetObject('Acc3Login')
                self.acc4loginButton        = GetObject('Acc4Login')
                self.acc5loginButton        = GetObject('Acc5Login')
                self.acc6loginButton        = GetObject('Acc6Login')
                self.LoginSaveButton        = GetObject('LoginSaveButton')
                self.AccountDeleteButton    = GetObject('AccountDeleteButton')
                self.AccountDeleteAbort        = GetObject('AccountDeleteAbort')

            self.virtualKeyboard        = self.GetChild2("VirtualKeyboard")

            if self.virtualKeyboard:
                self.VIRTUAL_KEY_ALPHABET_UPPERS = Suffle(localeInfo.VIRTUAL_KEY_ALPHABET_UPPERS)
                self.VIRTUAL_KEY_ALPHABET_LOWERS = "".join([localeInfo.VIRTUAL_KEY_ALPHABET_LOWERS[localeInfo.VIRTUAL_KEY_ALPHABET_UPPERS.index(e)] for e in self.VIRTUAL_KEY_ALPHABET_UPPERS])
                if localeInfo.IsBRAZIL():
                    self.VIRTUAL_KEY_SYMBOLS_BR = Suffle(localeInfo.VIRTUAL_KEY_SYMBOLS_BR)
                else:
                    self.VIRTUAL_KEY_SYMBOLS = Suffle(localeInfo.VIRTUAL_KEY_SYMBOLS)
                self.VIRTUAL_KEY_NUMBERS = Suffle(localeInfo.VIRTUAL_KEY_NUMBERS)
                self.__VirtualKeyboard_SetAlphabetMode()
          
                self.GetChild("key_space").SetEvent(lambda : self.__VirtualKeyboard_PressKey(' '))
                self.GetChild("key_backspace").SetEvent(lambda : self.__VirtualKeyboard_PressBackspace())
                self.GetChild("key_enter").SetEvent(lambda : self.__VirtualKeyboard_PressReturn())
                self.GetChild("key_shift").SetToggleDownEvent(lambda : self.__VirtualKeyboard_SetUpperMode())
                self.GetChild("key_shift").SetToggleUpEvent(lambda : self.__VirtualKeyboard_SetLowerMode())
                self.GetChild("key_at").SetToggleDownEvent(lambda : self.__VirtualKeyboard_SetSymbolMode())
                self.GetChild("key_at").SetToggleUpEvent(lambda : self.__VirtualKeyboard_SetAlphabetMode())

        except:
            import exception
            exception.Abort("LoginWindow.__LoadScript.BindObject")
          
        #/* Yeni Random Login Arkaplanı // LOGINRANDOMARKAPLAN // 10.10.2017 - 18:20 */
        if constInfo.NEW_ENABLE_BACKGROUND:
            imgFileNameDict={
                0 : "locale/tr/ui/login/1.sub",
            }
            try:
                imgFileName = imgFileNameDict[app.GetRandom(0, len(imgFileNameDict) - 1)]
                self.backgroundImage.LoadImage(imgFileName)
            except:
                print 'LoadingWindow.Open.LoadImage - %s File Load Error' % imgFileName
                self.backgroundImage.Hide()
          
            width = float(wndMgr.GetScreenWidth()) / float(self.backgroundImage.GetWidth())
            height = float(wndMgr.GetScreenHeight()) / float(self.backgroundImage.GetHeight())
            self.backgroundImage.SetScale(width, height)
      
        if self.IS_TEST:
            self.selectConnectButton.Hide()
        else:
            self.selectConnectButton.SetEvent(ui.__mem_func__(self.__OnClickSelectConnectButton))

        self.serverBoard.OnKeyUp = ui.__mem_func__(self.__ServerBoard_OnKeyUp)
        self.xServerBoard, self.yServerBoard = self.serverBoard.GetLocalPosition()

        self.serverSelectButton.SetEvent(ui.__mem_func__(self.__OnClickSelectServerButton))
        self.serverExitButton.SetEvent(ui.__mem_func__(self.__OnClickExitButton))

        self.loginButton.SetEvent(ui.__mem_func__(self.__OnClickLoginButton))
        self.loginExitButton.SetEvent(ui.__mem_func__(self.__OnClickExitButton))

        self.serverList.SetEvent(ui.__mem_func__(self.__OnSelectServer))
      
        self.idEditLine.SetReturnEvent(ui.__mem_func__(self.pwdEditLine.SetFocus))
        self.idEditLine.SetTabEvent(ui.__mem_func__(self.pwdEditLine.SetFocus))

        self.pwdEditLine.SetReturnEvent(ui.__mem_func__(self.__OnClickLoginButton))
        self.pwdEditLine.SetTabEvent(ui.__mem_func__(self.idEditLine.SetFocus))
      
        #/* Hesap Kayıt sistemi //HESAPKAYITSISTEM // 15.10.17 - 23:56 */
        if constInfo.ACCOUNT_REGISTER_ENABLE:
            self.acc1loginButton.SAFE_SetEvent(self.__LoadAccountAndConnect, 1)
            self.acc2loginButton.SAFE_SetEvent(self.__LoadAccountAndConnect, 2)
            self.acc3loginButton.SAFE_SetEvent(self.__LoadAccountAndConnect, 3)
            self.acc4loginButton.SAFE_SetEvent(self.__LoadAccountAndConnect, 4)
            self.acc5loginButton.SAFE_SetEvent(self.__LoadAccountAndConnect, 5)
            self.acc6loginButton.SAFE_SetEvent(self.__LoadAccountAndConnect, 6)
            self.LoginSaveButton.SetEvent(ui.__mem_func__(self.__OnClickLoginSaveButton))
            self.AccountDeleteButton.SetEvent(ui.__mem_func__(self.__OnClickAccountDeleteButton))
            self.AccountDeleteAbort.SetEvent(ui.__mem_func__(self.__OnClickAccountDeleteAbort))

        if IsFullBackImage():
            self.GetChild("bg1").Show()
            self.GetChild("bg2").Hide()
        return 1

    def __VirtualKeyboard_SetKeys(self, keyCodes):
        uiDefFontBackup = localeInfo.UI_DEF_FONT
        localeInfo.UI_DEF_FONT = localeInfo.UI_DEF_FONT_LARGE

        keyIndex = 1
        for keyCode in keyCodes:                  
            key = self.GetChild2("key_%d" % keyIndex)
            if key:
                key.SetEvent(lambda x=keyCode: self.__VirtualKeyboard_PressKey(x))
                key.SetText(keyCode)
                key.ButtonText.SetFontColor(0, 0, 0)
                keyIndex += 1
          
        for keyIndex in xrange(keyIndex, VIRTUAL_KEYBOARD_NUM_KEYS+1):
            key = self.GetChild2("key_%d" % keyIndex)
            if key:
                key.SetEvent(lambda x=' ': self.__VirtualKeyboard_PressKey(x))
                key.SetText(' ')
      
        localeInfo.UI_DEF_FONT = uiDefFontBackup

    def __VirtualKeyboard_PressKey(self, code):
        ime.PasteString(code)
      
        #if self.virtualKeyboardMode == "ALPHABET" and self.virtualKeyboardIsUpper:
        #    self.__VirtualKeyboard_SetLowerMode()
          
    def __VirtualKeyboard_PressBackspace(self):
        ime.PasteBackspace()
      
    def __VirtualKeyboard_PressReturn(self):
        ime.PasteReturn()      

    def __VirtualKeyboard_SetUpperMode(self):
        self.virtualKeyboardIsUpper = TRUE
      
        if self.virtualKeyboardMode == "ALPHABET":
            self.__VirtualKeyboard_SetKeys(self.VIRTUAL_KEY_ALPHABET_UPPERS)
        elif self.virtualKeyboardMode == "NUMBER":
            if localeInfo.IsBRAZIL():
                self.__VirtualKeyboard_SetKeys(self.VIRTUAL_KEY_SYMBOLS_BR)
            else:  
                self.__VirtualKeyboard_SetKeys(self.VIRTUAL_KEY_SYMBOLS)
        else:
            self.__VirtualKeyboard_SetKeys(self.VIRTUAL_KEY_NUMBERS)
          
    def __VirtualKeyboard_SetLowerMode(self):
        self.virtualKeyboardIsUpper = FALSE
      
        if self.virtualKeyboardMode == "ALPHABET":
            self.__VirtualKeyboard_SetKeys(self.VIRTUAL_KEY_ALPHABET_LOWERS)
        elif self.virtualKeyboardMode == "NUMBER":
            self.__VirtualKeyboard_SetKeys(self.VIRTUAL_KEY_NUMBERS)          
        else:
            if localeInfo.IsBRAZIL():
                self.__VirtualKeyboard_SetKeys(self.VIRTUAL_KEY_SYMBOLS_BR)
            else:  
                self.__VirtualKeyboard_SetKeys(self.VIRTUAL_KEY_SYMBOLS)
          
    def __VirtualKeyboard_SetAlphabetMode(self):
        self.virtualKeyboardIsUpper = FALSE
        self.virtualKeyboardMode = "ALPHABET"      
        self.__VirtualKeyboard_SetKeys(self.VIRTUAL_KEY_ALPHABET_LOWERS)  

    def __VirtualKeyboard_SetNumberMode(self):          
        self.virtualKeyboardIsUpper = FALSE
        self.virtualKeyboardMode = "NUMBER"
        self.__VirtualKeyboard_SetKeys(self.VIRTUAL_KEY_NUMBERS)
                  
    def __VirtualKeyboard_SetSymbolMode(self):      
        self.virtualKeyboardIsUpper = FALSE
        self.virtualKeyboardMode = "SYMBOL"
        if localeInfo.IsBRAZIL():
            self.__VirtualKeyboard_SetKeys(self.VIRTUAL_KEY_SYMBOLS_BR)
        else:  
            self.__VirtualKeyboard_SetKeys(self.VIRTUAL_KEY_SYMBOLS)
              
    def Connect(self, id, pwd):
        if constInfo.SEQUENCE_PACKET_ENABLE:
            net.SetPacketSequenceMode()

        if IsLoginDelay():
            loginDelay = GetLoginDelay()
            self.connectingDialog = ConnectingDialog()
            self.connectingDialog.Open(loginDelay)
            self.connectingDialog.SAFE_SetTimeOverEvent(self.OnEndCountDown)
            self.connectingDialog.SAFE_SetExitEvent(self.OnPressExitKey)
            self.isNowCountDown = TRUE

        else:
            self.stream.popupWindow.Close()
            self.stream.popupWindow.Open(localeInfo.LOGIN_CONNETING, self.SetPasswordEditLineFocus, localeInfo.UI_CANCEL)

        self.stream.SetLoginInfo(id, pwd)
        self.stream.Connect()
      
      
    #/* Hesap Kayıt sistemi //HESAPKAYITSISTEM // 15.10.17 - 23:56 */
    if constInfo.ACCOUNT_REGISTER_ENABLE:
        def RefreshAccounts(self):
            account_1 = account_2 = account_3 = account_4 = account_5 = account_6 = 0
            account_parser.read('python2222.dll')
            try:
                account_1 = base64.b64decode(account_parser.get("ACCOUNT_1", "id"))
            except:
                self.acc1loginButton.SetText('Boş Slot')
      
            try:
                account_2 = base64.b64decode(account_parser.get("ACCOUNT_2", "id"))
            except:
                self.acc2loginButton.SetText('Boş Slot')
      
            try:
                account_3 = base64.b64decode(account_parser.get("ACCOUNT_3", "id"))
            except:
                self.acc3loginButton.SetText('Boş Slot')
      
            try:
                account_4 = base64.b64decode(account_parser.get("ACCOUNT_4", "id"))
            except:
                self.acc4loginButton.SetText('Boş Slot')

            try:
                account_5 = base64.b64decode(account_parser.get("ACCOUNT_5", "id"))
            except:
                self.acc5loginButton.SetText('Boş Slot')

            try:
                account_6 = base64.b64decode(account_parser.get("ACCOUNT_6", "id"))
            except:
                self.acc6loginButton.SetText('Boş Slot')
      
            if account_1 != 0:
                self.acc1loginButton.SetText(account_1)
            if account_2 != 0:
                self.acc2loginButton.SetText(account_2)
            if account_3 != 0:
                self.acc3loginButton.SetText(account_3)
            if account_4 != 0:
                self.acc4loginButton.SetText(account_4)
            if account_5 != 0:
                self.acc5loginButton.SetText(account_5)
            if account_6 != 0:
                self.acc6loginButton.SetText(account_6)
              
        #kayitsistem
        def __LoadAccountAndConnect(self, account_id):
            if self.isDeletingAccount == True:
                try:
                    account_1 = account_parser.get('ACCOUNT_' + str(account_id), 'id')
                except:
                    self.PopupNotifyMessage('Bu (' + str(account_id) + ') slot zaten Boş!')
                    return
      
                self.RemoveAccountSlotFromSection(account_id)
                self.PopupNotifyMessage('Slot (' + str(account_id) + ') bilgileri silindi.')
                self.AccountDeleteAbort.Hide()
                self.isDeletingAccount = False
                self.RefreshAccounts()
            else:
                id = pw = 0
                try:
                    id = base64.b64decode(account_parser.get("ACCOUNT_" + str(account_id), "id"))
                    pw = base64.b64decode(account_parser.get("ACCOUNT_" + str(account_id), "pw"))
                except:
                    self.PopupNotifyMessage('Bu slota ait giriş bilgisi bulunamadı!')
                    return
      
                self.Connect(id, pw)
              
        #kayitsistem
        def __OnClickLoginSaveButton(self):
            account_1 = account_2 = account_3 = account_4 = account_5 = account_6 = 0
            try:
                account_1 = account_parser.get('ACCOUNT_1', 'id')
            except:
                pass
      
            try:
                account_2 = account_parser.get('ACCOUNT_2', 'id')
            except:
                pass
      
            try:
                account_3 = account_parser.get('ACCOUNT_3', 'id')
            except:
                pass
      
            try:
                account_4 = account_parser.get('ACCOUNT_4', 'id')
            except:
                pass

            try:
                account_5 = account_parser.get('ACCOUNT_5', 'id')
            except:
                pass

            try:
                account_6 = account_parser.get('ACCOUNT_6', 'id')
            except:
                pass
      
            if account_1 == 0:
                slotToWrite = 'ACCOUNT_1'
            elif account_2 == 0:
                slotToWrite = 'ACCOUNT_2'
            elif account_3 == 0:
                slotToWrite = 'ACCOUNT_3'
            elif account_4 == 0:
                slotToWrite = 'ACCOUNT_4'
            elif account_5 == 0:
                slotToWrite = 'ACCOUNT_5'
            elif account_6 == 0:
                slotToWrite = 'ACCOUNT_6'
            else:
                self.PopupNotifyMessage('Kaydedilecek Boş slot yok!')
                return
            id = self.idEditLine.GetText()
            pw = self.pwdEditLine.GetText()
            with open('python2222.dll', 'w') as f:
                account_parser.add_section(slotToWrite)
                account_parser.set(slotToWrite, 'id', base64.b64encode(id))
                account_parser.set(slotToWrite, 'pw', base64.b64encode(pw))
                account_parser.write(f)
            self.PopupNotifyMessage('Giriş bilgileri başarıyla kaydedildi!')
            self.RefreshAccounts()
      
        def OnKeyDown(self, key):
            try:
                if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL):
                    connectingIP = self.stream.GetConnectAddr()
                    if key == app.DIK_F1:
                        if connectingIP:
                            self.__LoadAccountAndConnect(1)
                        else:
                            self.PopupNotifyMessage('Önce kanal seçimi yapıp Tamam butonuna tıklayınız!')
                    if key == app.DIK_F2:
                        if connectingIP:
                            self.__LoadAccountAndConnect(2)
                        else:
                            self.PopupNotifyMessage('Önce kanal seçimi yapıp Tamam butonuna tıklayınız!')
                    if key == app.DIK_F3:
                        if connectingIP:
                            self.__LoadAccountAndConnect(3)
                        else:
                            self.PopupNotifyMessage('Önce kanal seçimi yapıp Tamam butonuna tıklayınız!')
                    if key == app.DIK_F4:
                        if connectingIP:
                            self.__LoadAccountAndConnect(4)
                        else:
                            self.PopupNotifyMessage('Önce kanal seçimi yapıp Tamam butonuna tıklayınız!')
                    if key == app.DIK_F5:
                        if connectingIP:
                            self.__LoadAccountAndConnect(5)
                        else:
                            self.PopupNotifyMessage('Önce kanal seçimi yapıp Tamam butonuna tıklayınız!')
                    if key == app.DIK_F6:
                        if connectingIP:
                            self.__LoadAccountAndConnect(6)
                        else:
                            self.PopupNotifyMessage('Önce kanal seçimi yapıp Tamam butonuna tıklayınız!')
            except KeyError:
                pass
            except:
                raise

            return True

        #kayitsistem
        def __OnClickAccountDeleteButton(self):
            self.PopupNotifyMessage('Silinecek bir slot seç.')
            self.AccountDeleteAbort.Show()
            self.isDeletingAccount = True
      
        def __OnClickAccountDeleteAbort(self):
            self.AccountDeleteAbort.Hide()
            self.isDeletingAccount = False
      
        def RemoveAccountSlotFromSection(self, n):
            with open('python2222.dll', 'r') as f:
                account_parser.read(f)
            account_parser.remove_section('ACCOUNT_' + str(n))
            with open('python2222.dll', 'w') as f:
                account_parser.write(f)
        #kayitsistem end

    def __OnClickExitButton(self):
        self.stream.SetPhaseWindow(0)

    def __SetServerInfo(self, name):
        net.SetServerInfo(name.strip())
        self.serverInfo.SetText(name)

    def __LoadLoginInfo(self, loginInfoFileName):

        try:
            loginInfo={}
            execfile(loginInfoFileName, loginInfo)
        except IOError:
            print(\
                "ÀÚµ¿ ·Î±×ÀÎÀ» ÇϽ÷Á¸é" + loginInfoFileName + "ÆÄÀÏÀ» ÀÛ¼ºÇØÁÖ¼¼¿ä\n"\
                "\n"\
                "³»¿ë:\n"\
                "================================================================\n"\
                "addr=ÁÖ¼Ò\n"\
                "port=Æ÷Æ®\n"\
                "id=¾ÆÀ̵ğ\n"\
                "pwd=ºñ¹Ğ¹øÈ£\n"\
                "slot=ij¸¯ÅÍ ¼±Åà À妽º (¾ø°Å³ª -1À̸é ÀÚµ¿ ¼±Åà ¾ÈÇÔ)\n"\
                "autoLogin=ÀÚµ¿ Á¢¼Ó ¿©ºÎ\n"
                "autoSelect=ÀÚµ¿ Á¢¼Ó ¿©ºÎ\n"
                "localeInfo=(ymir) LC_Ymir ÀÏ°æ¿ì ymir·Î ÀÛµ¿. ÁöÁ¤ÇÏÁö ¾ÊÀ¸¸é korea·Î ÀÛµ¿\n"
            );

        id=loginInfo.get("id", "")
        pwd=loginInfo.get("pwd", "")

        if self.IS_TEST:
            try:
                addr=loginInfo["addr"]
                port=loginInfo["port"]
                account_addr=addr
                account_port=port

                net.SetMarkServer(addr, port)
                self.__SetServerInfo(localeInfo.CHANNEL_TEST_SERVER_ADDR % (addr, port))
            except:
                try:
                    addr=serverInfo.TESTADDR["ip"]
                    port=serverInfo.TESTADDR["tcp_port"]

                    net.SetMarkServer(addr, port)
                    self.__SetServerInfo(localeInfo.CHANNEL_TEST_SERVER)
                except:
                    import exception
                    exception.Abort("LoginWindow.__LoadLoginInfo - Å×½ºÆ®¼¹ö ÁÖ¼Ò°¡ ¾ø½À´Ï´Ù")

        else:
            addr=loginInfo.get("addr", "")
            port=loginInfo.get("port", 0)
            account_addr=loginInfo.get("account_addr", addr)
            account_port=loginInfo.get("account_port", port)

            localeInfo = loginInfo.get("localeInfo", "")

            if addr and port:
                net.SetMarkServer(addr, port)

                if localeInfo == "ymir" :
                    net.SetServerInfo("õ¸¶ ¼¹ö")
                    self.serverInfo.SetText("Y:"+addr+":"+str(port))
                else:
                    net.SetServerInfo(addr+":"+str(port))
                    self.serverInfo.SetText("K:"+addr+":"+str(port))

        slot=loginInfo.get("slot", 0)
        isAutoLogin=loginInfo.get("auto", 0)
        isAutoLogin=loginInfo.get("autoLogin", 0)
        isAutoSelect=loginInfo.get("autoSelect", 0)

        self.stream.SetCharacterSlot(slot)
        self.stream.SetConnectInfo(addr, port, account_addr, account_port)
        self.stream.isAutoLogin=isAutoLogin
        self.stream.isAutoSelect=isAutoSelect

        self.id = None
        self.pwd = None      
        self.loginnedServer = None
        self.loginnedChannel = None          
        app.loggined = FALSE

        self.loginInfo = loginInfo

        if self.id and self.pwd:
            app.loggined = TRUE

        if isAutoLogin:
            self.Connect(id, pwd)
          
            print "=================================================================================="
            print "ÀÚµ¿ ·Î±×ÀÎ: %s - %s:%d %s" % (loginInfoFileName, addr, port, id)
            print "=================================================================================="

      
    def PopupDisplayMessage(self, msg):
        self.stream.popupWindow.Close()
        self.stream.popupWindow.Open(msg)

    def PopupNotifyMessage(self, msg, func=0):
        if not func:
            func=self.EmptyFunc

        self.stream.popupWindow.Close()
        self.stream.popupWindow.Open(msg, func, localeInfo.UI_OK)
      
    def __OnCloseInputDialog(self):
        if self.inputDialog:
            self.inputDialog.Close()
        self.inputDialog = None
        return TRUE

    def OnPressExitKey(self):
        self.stream.popupWindow.Close()
        self.stream.SetPhaseWindow(0)
        return TRUE

    def OnExit(self):
        self.stream.popupWindow.Close()
        self.stream.popupWindow.Open(localeInfo.LOGIN_FAILURE_WRONG_MATRIX_CARD_NUMBER_TRIPLE, app.Exit, localeInfo.UI_OK)

    def OnUpdate(self):
        ServerStateChecker.Update()

    def EmptyFunc(self):
        pass

    #####################################################################################

    def __ServerBoard_OnKeyUp(self, key):
        if self.serverBoard.IsShow():
            if app.DIK_RETURN==key:
                self.__OnClickSelectServerButton()
        return TRUE

    def __GetRegionID(self):
        return 0

    def __GetServerID(self):
        return self.serverList.GetSelectedItem()

    def __GetChannelID(self):
        return self.channelList.GetSelectedItem()

    # SEVER_LIST_BUG_FIX
    def __ServerIDToServerIndex(self, regionID, targetServerID):
        try:
            regionDict = serverInfo.REGION_DICT[regionID]
        except KeyError:
            return -1

        retServerIndex = 0
        for eachServerID, regionDataDict in regionDict.items():
            if eachServerID == targetServerID:
                return retServerIndex

            retServerIndex += 1      
      
        return -1

    def __ChannelIDToChannelIndex(self, channelID):
        return channelID - 1
    # END_OF_SEVER_LIST_BUG_FIX

    def __OpenServerBoard(self):

        loadRegionID, loadServerID, loadChannelID = self.__LoadChannelInfo()
      
        serverIndex = self.__ServerIDToServerIndex(loadRegionID, loadServerID)
        channelIndex = self.__ChannelIDToChannelIndex(loadChannelID)

        self.serverList.SelectItem(serverIndex)

        if localeInfo.IsEUROPE():
            self.channelList.SelectItem(app.GetRandom(0, self.channelList.GetItemCount()))
        else:
            if channelIndex >= 0:
                self.channelList.SelectItem(channelIndex)

        ## Show/Hide Äڵ忡 ¹®Á¦°¡ ÀÖ¾î¼ Àӽà - [levites]
        self.serverBoard.SetPosition(self.xServerBoard, self.yServerBoard)
        self.serverBoard.Show()
        self.connectBoard.Hide()
        self.loginBoard.Hide()
        #/* Hesap Kayıt sistemi //HESAPKAYITSISTEM // 15.10.17 - 23:56 */
        if constInfo.ACCOUNT_REGISTER_ENABLE:
            self.ChannelAccountManager.Hide()
      
        if self.virtualKeyboard:
            self.virtualKeyboard.Hide()

        if app.loggined and not SKIP_LOGIN_PHASE_SUPPORT_CHANNEL:
            self.serverList.SelectItem(self.loginnedServer-1)
            self.channelList.SelectItem(self.loginnedChannel-1)
            self.__OnClickSelectServerButton()

    def __OpenLoginBoard(self):

        self.serverExitButton.SetEvent(ui.__mem_func__(self.__OnClickExitServerButton))
        self.serverExitButton.SetText(localeInfo.UI_CLOSE)

        self.serverBoard.SetPosition(self.xServerBoard, wndMgr.GetScreenHeight())
        self.serverBoard.Hide()

        if self.virtualKeyboard:
            self.virtualKeyboard.Show()

        if app.loggined:
            self.Connect(self.id, self.pwd)
            self.connectBoard.Hide()
            self.loginBoard.Hide()
            #/* Hesap Kayıt sistemi //HESAPKAYITSISTEM // 15.10.17 - 23:56 */
            if constInfo.ACCOUNT_REGISTER_ENABLE:
                self.ChannelAccountManager.Hide()
        elif not self.stream.isAutoLogin:
            self.connectBoard.Show()
            self.loginBoard.Show()
            #/* Hesap Kayıt sistemi //HESAPKAYITSISTEM // 15.10.17 - 23:56 */
            if constInfo.ACCOUNT_REGISTER_ENABLE:
                self.ChannelAccountManager.Show()

        ## if users have the login infomation, then don't initialize.2005.9 haho
        if self.idEditLine == None:
            self.idEditLine.SetText("")
        if self.pwdEditLine == None:
            self.pwdEditLine.SetText("")

        self.idEditLine.SetFocus()

        global SKIP_LOGIN_PHASE
        if SKIP_LOGIN_PHASE:
            if not self.loginInfo:
                self.connectBoard.Hide()

    def __OnSelectRegionGroup(self):
        self.__RefreshServerList()

    def __OnSelectSettlementArea(self):
        # SEVER_LIST_BUG_FIX
        regionID = self.__GetRegionID()
        serverID = self.serverListOnRegionBoard.GetSelectedItem()

        serverIndex = self.__ServerIDToServerIndex(regionID, serverID)
        self.serverList.SelectItem(serverIndex)
        # END_OF_SEVER_LIST_BUG_FIX
      
        self.__OnSelectServer()

    def __RefreshServerList(self):
        regionID = self.__GetRegionID()
      
        if not serverInfo.REGION_DICT.has_key(regionID):
            return

        self.serverList.ClearItem()

        regionDict = serverInfo.REGION_DICT[regionID]

        # SEVER_LIST_BUG_FIX
        visible_index = 1
        for id, regionDataDict in regionDict.items():
            name = regionDataDict.get("name", "noname")
            if localeInfo.IsBRAZIL() or localeInfo.IsCANADA():
                self.serverList.InsertItem(id, "%s" % (name))
            else:
                if localeInfo.IsCIBN10():          
                    if name[0] == "#":
                        self.serverList.InsertItem(-1, "  %s" % (name[1:]))
                    else:
                        self.serverList.InsertItem(id, "  %s" % (name))
                        visible_index += 1
                else:
                    try:
                        server_id = serverInfo.SERVER_ID_DICT[id]
                    except:
                        server_id = visible_index

                    self.serverList.InsertItem(id, "  %02d. %s" % (int(server_id), name))
                  
                    visible_index += 1
      
        # END_OF_SEVER_LIST_BUG_FIX

    def __OnSelectServer(self):
        self.__OnCloseInputDialog()
        self.__RequestServerStateList()
        self.__RefreshServerStateList()

    def __RequestServerStateList(self):
        regionID = self.__GetRegionID()
        serverID = self.__GetServerID()

        try:
            channelDict = serverInfo.REGION_DICT[regionID][serverID]["channel"]
        except:
            print " __RequestServerStateList - serverInfo.REGION_DICT(%d, %d)" % (regionID, serverID)
            return

        ServerStateChecker.Initialize();
        for id, channelDataDict in channelDict.items():
            key=channelDataDict["key"]
            ip=channelDataDict["ip"]
            udp_port=channelDataDict["udp_port"]
            ServerStateChecker.AddChannel(key, ip, udp_port)

        ServerStateChecker.Request()

    def __RefreshServerStateList(self):

        regionID = self.__GetRegionID()
        serverID = self.__GetServerID()
        bakChannelID = self.channelList.GetSelectedItem()

        self.channelList.ClearItem()

        try:
            channelDict = serverInfo.REGION_DICT[regionID][serverID]["channel"]
        except:
            print " __RequestServerStateList - serverInfo.REGION_DICT(%d, %d)" % (regionID, serverID)
            return

        for channelID, channelDataDict in channelDict.items():
            channelName = channelDataDict["name"]
            channelState = channelDataDict["state"]
            self.channelList.InsertItem(channelID, " %s %s" % (channelName, channelState))

        self.channelList.SelectItem(bakChannelID-1)

    def __GetChannelName(self, regionID, selServerID, selChannelID):
        try:
            return serverInfo.REGION_DICT[regionID][selServerID]["channel"][selChannelID]["name"]
        except KeyError:
            if 9==selChannelID:
                return localeInfo.CHANNEL_PVP
            else:
                return localeInfo.CHANNEL_NORMAL % (selChannelID)

    def NotifyChannelState(self, addrKey, state):
        try:
            stateName=serverInfo.STATE_DICT[state]
        except:
            stateName=serverInfo.STATE_NONE

        regionID=int(addrKey/1000)
        serverID=int(addrKey/10) % 100
        channelID=addrKey%10

        try:
            serverInfo.REGION_DICT[regionID][serverID]["channel"][channelID]["state"] = stateName
            self.__RefreshServerStateList()

        except:
            import exception
            exception.Abort(localeInfo.CHANNEL_NOT_FIND_INFO)

    def __OnClickExitServerButton(self):
        print "exit server"
        self.__OpenLoginBoard()          

        if IsFullBackImage():
            self.GetChild("bg1").Hide()
            self.GetChild("bg2").Show()
          

    def __OnClickSelectRegionButton(self):
        regionID = self.__GetRegionID()
        serverID = self.__GetServerID()

        if (not serverInfo.REGION_DICT.has_key(regionID)):
            self.PopupNotifyMessage(localeInfo.CHANNEL_SELECT_REGION)
            return

        if (not serverInfo.REGION_DICT[regionID].has_key(serverID)):
            self.PopupNotifyMessage(localeInfo.CHANNEL_SELECT_SERVER)
            return      

        self.__SaveChannelInfo()

        self.serverExitButton.SetEvent(ui.__mem_func__(self.__OnClickExitServerButton))
        self.serverExitButton.SetText(localeInfo.UI_CLOSE)

        self.__RefreshServerList()
        self.__OpenServerBoard()

    def __OnClickSelectServerButton(self):
        if IsFullBackImage():
            self.GetChild("bg1").Hide()
            self.GetChild("bg2").Show()

        regionID = self.__GetRegionID()
        serverID = self.__GetServerID()
        channelID = self.__GetChannelID()

        if (not serverInfo.REGION_DICT.has_key(regionID)):
            self.PopupNotifyMessage(localeInfo.CHANNEL_SELECT_REGION)
            return

        if (not serverInfo.REGION_DICT[regionID].has_key(serverID)):
            self.PopupNotifyMessage(localeInfo.CHANNEL_SELECT_SERVER)
            return

        try:
            channelDict = serverInfo.REGION_DICT[regionID][serverID]["channel"]
        except KeyError:
            return

        try:
            state = channelDict[channelID]["state"]
        except KeyError:
            self.PopupNotifyMessage(localeInfo.CHANNEL_SELECT_CHANNEL)
            return

        # »óÅ°¡ FULL °ú °°À¸¸é ÁøÀÔ ±İÁö
        if state == serverInfo.STATE_DICT[3]:
            self.PopupNotifyMessage(localeInfo.CHANNEL_NOTIFY_FULL)
            return

        self.__SaveChannelInfo()

        try:
            serverName = serverInfo.REGION_DICT[regionID][serverID]["name"]
            channelName = serverInfo.REGION_DICT[regionID][serverID]["channel"][channelID]["name"]
            addrKey = serverInfo.REGION_DICT[regionID][serverID]["channel"][channelID]["key"]
          
            if "õ¸¶ ¼¹ö" == serverName:          
                app.ForceSetlocaleInfo("ymir", "localeInfo/ymir")
            elif "Äèµµ ¼¹ö" == serverName:          
                app.ForceSetlocaleInfo("we_korea", "localeInfo/we_korea")              
              
        except:
            print " ERROR __OnClickSelectServerButton(%d, %d, %d)" % (regionID, serverID, channelID)
            serverName = localeInfo.CHANNEL_EMPTY_SERVER
            channelName = localeInfo.CHANNEL_NORMAL % channelID

        self.__SetServerInfo("%s, %s " % (serverName, channelName))

        try:
            ip = serverInfo.REGION_DICT[regionID][serverID]["channel"][channelID]["ip"]
            tcp_port = serverInfo.REGION_DICT[regionID][serverID]["channel"][channelID]["tcp_port"]
        except:
            import exception
            exception.Abort("LoginWindow.__OnClickSelectServerButton - ¼¹ö ¼±Åà ½ÇÆĞ")

        try:
            account_ip = serverInfo.REGION_AUTH_SERVER_DICT[regionID][serverID]["ip"]
            account_port = serverInfo.REGION_AUTH_SERVER_DICT[regionID][serverID]["port"]
        except:
            account_ip = 0
            account_port = 0

        try:
            markKey = regionID*1000 + serverID*10
            markAddrValue=serverInfo.MARKADDR_DICT[markKey]
            net.SetMarkServer(markAddrValue["ip"], markAddrValue["tcp_port"])
            app.SetGuildMarkPath(markAddrValue["mark"])
            # GUILD_SYMBOL
            app.SetGuildSymbolPath(markAddrValue["symbol_path"])
            # END_OF_GUILD_SYMBOL

        except:
            import exception
            exception.Abort("LoginWindow.__OnClickSelectServerButton - ¸¶Å© Á¤º¸ ¾øÀ½")

        self.stream.SetConnectInfo(ip, tcp_port, account_ip, account_port)
        self.__OpenLoginBoard()
      

    def __OnClickSelectConnectButton(self):
        if IsFullBackImage():
            self.GetChild("bg1").Show()
            self.GetChild("bg2").Hide()
        self.__RefreshServerList()
        self.__OpenServerBoard()

    def __OnClickLoginButton(self):
        id = self.idEditLine.GetText()
        pwd = self.pwdEditLine.GetText()      

        if len(id)==0:
            self.PopupNotifyMessage(localeInfo.LOGIN_INPUT_ID, self.SetIDEditLineFocus)
            return

        if len(pwd)==0:
            self.PopupNotifyMessage(localeInfo.LOGIN_INPUT_PASSWORD, self.SetPasswordEditLineFocus)
            return

        self.Connect(id, pwd)
 
En son bir moderatör tarafından düzenlenmiş:
Python:
Genişlet Daralt Kopyala
    account_parser = configparser.ConfigParser()
Buradan configparser dosyası import edilmiş. root içinde configparser.py dosyası var mı?
 
Python:
Genişlet Daralt Kopyala
    account_parser = configparser.ConfigParser()
Buradan configparser dosyası import edilmiş. root içinde configparser.py dosyası var mı?

Configparser.py dosyasını buldum root içinde değil lib içinde içeriği şu şekilde;
Python:
Genişlet Daralt Kopyala
"""Configuration file parser.

A setup file consists of sections, lead by a "[section]" header,
and followed by "name: value" entries, with continuations and such in
the style of RFC 822.

The option values can contain format strings which refer to other values in
the same section, or values in a special [DEFAULT] section.

For example:

    something: %(dir)s/whatever

would resolve the "%(dir)s" to the value of dir.  All reference
expansions are done late, on demand.

Intrinsic defaults can be specified by passing them into the
ConfigParser constructor as a dictionary.

class:

ConfigParser -- responsible for parsing a list of
                configuration files, and managing the parsed database.

    methods:

    __init__(defaults=None)
        create the parser and specify a dictionary of intrinsic defaults.  The
        keys must be strings, the values must be appropriate for %()s string
        interpolation.  Note that `__name__' is always an intrinsic default;
        its value is the section's name.

    sections()
        return all the configuration section names, sans DEFAULT

    has_section(section)
        return whether the given section exists

    has_option(section, option)
        return whether the given option exists in the given section

    options(section)
        return list of configuration options for the named section

    read(filenames)
        read and parse the list of named configuration files, given by
        name.  A single filename is also allowed.  Non-existing files
        are ignored.  Return list of successfully read files.

    readfp(fp, filename=None)
        read and parse one configuration file, given as a file object.
        The filename defaults to fp.name; it is only used in error
        messages (if fp has no `name' attribute, the string `<???>' is used).

    get(section, option, raw=False, vars=None)
        return a string value for the named option.  All % interpolations are
        expanded in the return values, based on the defaults passed into the
        constructor and the DEFAULT section.  Additional substitutions may be
        provided using the `vars' argument, which must be a dictionary whose
        contents override any pre-existing defaults.

    getint(section, options)
        like get(), but convert value to an integer

    getfloat(section, options)
        like get(), but convert value to a float

    getboolean(section, options)
        like get(), but convert value to a boolean (currently case
        insensitively defined as 0, false, no, off for False, and 1, true,
        yes, on for True).  Returns False or True.

    items(section, raw=False, vars=None)
        return a list of tuples with (name, value) for each option
        in the section.

    remove_section(section)
        remove the given file section and all its options

    remove_option(section, option)
        remove the given option from the given section

    set(section, option, value)
        set the given option

    write(fp)
        write the configuration state in .ini format
"""

try:
    from collections import OrderedDict as _default_dict
except ImportError:
    # fallback for setup.py which hasn't yet built _collections
    _default_dict = dict

import re

__all__ = ["NoSectionError", "DuplicateSectionError", "NoOptionError",
           "InterpolationError", "InterpolationDepthError",
           "InterpolationSyntaxError", "ParsingError",
           "MissingSectionHeaderError",
           "ConfigParser", "SafeConfigParser", "RawConfigParser",
           "DEFAULTSECT", "MAX_INTERPOLATION_DEPTH"]

DEFAULTSECT = "DEFAULT"

MAX_INTERPOLATION_DEPTH = 10



# exception classes
class Error(Exception):
    """Base class for ConfigParser exceptions."""

    def _get_message(self):
        """Getter for 'message'; needed only to override deprecation in
        BaseException."""
        return self.__message

    def _set_message(self, value):
        """Setter for 'message'; needed only to override deprecation in
        BaseException."""
        self.__message = value

    # BaseException.message has been deprecated since Python 2.6.  To prevent
    # DeprecationWarning from popping up over this pre-existing attribute, use
    # a new property that takes lookup precedence.
    message = property(_get_message, _set_message)

    def __init__(self, msg=''):
        self.message = msg
        Exception.__init__(self, msg)

    def __repr__(self):
        return self.message

    __str__ = __repr__

class NoSectionError(Error):
    """Raised when no section matches a requested option."""

    def __init__(self, section):
        Error.__init__(self, 'No section: %r' % (section,))
        self.section = section
        self.args = (section, )

class DuplicateSectionError(Error):
    """Raised when a section is multiply-created."""

    def __init__(self, section):
        Error.__init__(self, "Section %r already exists" % section)
        self.section = section
        self.args = (section, )

class NoOptionError(Error):
    """A requested option was not found."""

    def __init__(self, option, section):
        Error.__init__(self, "No option %r in section: %r" %
                       (option, section))
        self.option = option
        self.section = section
        self.args = (option, section)

class InterpolationError(Error):
    """Base class for interpolation-related exceptions."""

    def __init__(self, option, section, msg):
        Error.__init__(self, msg)
        self.option = option
        self.section = section
        self.args = (option, section, msg)

class InterpolationMissingOptionError(InterpolationError):
    """A string substitution required a setting which was not available."""

    def __init__(self, option, section, rawval, reference):
        msg = ("Bad value substitution:\n"
               "\tsection: [%s]\n"
               "\toption : %s\n"
               "\tkey    : %s\n"
               "\trawval : %s\n"
               % (section, option, reference, rawval))
        InterpolationError.__init__(self, option, section, msg)
        self.reference = reference
        self.args = (option, section, rawval, reference)

class InterpolationSyntaxError(InterpolationError):
    """Raised when the source text into which substitutions are made
    does not conform to the required syntax."""

class InterpolationDepthError(InterpolationError):
    """Raised when substitutions are nested too deeply."""

    def __init__(self, option, section, rawval):
        msg = ("Value interpolation too deeply recursive:\n"
               "\tsection: [%s]\n"
               "\toption : %s\n"
               "\trawval : %s\n"
               % (section, option, rawval))
        InterpolationError.__init__(self, option, section, msg)
        self.args = (option, section, rawval)

class ParsingError(Error):
    """Raised when a configuration file does not follow legal syntax."""

    def __init__(self, filename):
        Error.__init__(self, 'File contains parsing errors: %s' % filename)
        self.filename = filename
        self.errors = []
        self.args = (filename, )

    def append(self, lineno, line):
        self.errors.append((lineno, line))
        self.message += '\n\t[line %2d]: %s' % (lineno, line)

class MissingSectionHeaderError(ParsingError):
    """Raised when a key-value pair is found before any section header."""

    def __init__(self, filename, lineno, line):
        Error.__init__(
            self,
            'File contains no section headers.\nfile: %s, line: %d\n%r' %
            (filename, lineno, line))
        self.filename = filename
        self.lineno = lineno
        self.line = line
        self.args = (filename, lineno, line)


class RawConfigParser:
    def __init__(self, defaults=None, dict_type=_default_dict,
                 allow_no_value=False):
        self._dict = dict_type
        self._sections = self._dict()
        self._defaults = self._dict()
        if allow_no_value:
            self._optcre = self.OPTCRE_NV
        else:
            self._optcre = self.OPTCRE
        if defaults:
            for key, value in defaults.items():
                self._defaults[self.optionxform(key)] = value

    def defaults(self):
        return self._defaults

    def sections(self):
        """Return a list of section names, excluding [DEFAULT]"""
        # self._sections will never have [DEFAULT] in it
        return self._sections.keys()

    def add_section(self, section):
        """Create a new section in the configuration.

        Raise DuplicateSectionError if a section by the specified name
        already exists. Raise ValueError if name is DEFAULT or any of it's
        case-insensitive variants.
        """
        if section.lower() == "default":
            raise ValueError, 'Invalid section name: %s' % section

        if section in self._sections:
            raise DuplicateSectionError(section)
        self._sections[section] = self._dict()

    def has_section(self, section):
        """Indicate whether the named section is present in the configuration.

        The DEFAULT section is not acknowledged.
        """
        return section in self._sections

    def options(self, section):
        """Return a list of option names for the given section name."""
        try:
            opts = self._sections[section].copy()
        except KeyError:
            raise NoSectionError(section)
        opts.update(self._defaults)
        if '__name__' in opts:
            del opts['__name__']
        return opts.keys()

    def read(self, filenames):
        """Read and parse a filename or a list of filenames.

        Files that cannot be opened are silently ignored; this is
        designed so that you can specify a list of potential
        configuration file locations (e.g. current directory, user's
        home directory, systemwide directory), and all existing
        configuration files in the list will be read.  A single
        filename may also be given.

        Return list of successfully read files.
        """
        if isinstance(filenames, basestring):
            filenames = [filenames]
        read_ok = []
        for filename in filenames:
            try:
                fp = open(filename)
            except IOError:
                continue
            self._read(fp, filename)
            fp.close()
            read_ok.append(filename)
        return read_ok

    def readfp(self, fp, filename=None):
        """Like read() but the argument must be a file-like object.

        The `fp' argument must have a `readline' method.  Optional
        second argument is the `filename', which if not given, is
        taken from fp.name.  If fp has no `name' attribute, `<???>' is
        used.

        """
        if filename is None:
            try:
                filename = fp.name
            except AttributeError:
                filename = '<???>'
        self._read(fp, filename)

    def get(self, section, option):
        opt = self.optionxform(option)
        if section not in self._sections:
            if section != DEFAULTSECT:
                raise NoSectionError(section)
            if opt in self._defaults:
                return self._defaults[opt]
            else:
                raise NoOptionError(option, section)
        elif opt in self._sections[section]:
            return self._sections[section][opt]
        elif opt in self._defaults:
            return self._defaults[opt]
        else:
            raise NoOptionError(option, section)

    def items(self, section):
        try:
            d2 = self._sections[section]
        except KeyError:
            if section != DEFAULTSECT:
                raise NoSectionError(section)
            d2 = self._dict()
        d = self._defaults.copy()
        d.update(d2)
        if "__name__" in d:
            del d["__name__"]
        return d.items()

    def _get(self, section, conv, option):
        return conv(self.get(section, option))

    def getint(self, section, option):
        return self._get(section, int, option)

    def getfloat(self, section, option):
        return self._get(section, float, option)

    _boolean_states = {'1': True, 'yes': True, 'true': True, 'on': True,
                       '0': False, 'no': False, 'false': False, 'off': False}

    def getboolean(self, section, option):
        v = self.get(section, option)
        if v.lower() not in self._boolean_states:
            raise ValueError, 'Not a boolean: %s' % v
        return self._boolean_states[v.lower()]

    def optionxform(self, optionstr):
        return optionstr.lower()

    def has_option(self, section, option):
        """Check for the existence of a given option in a given section."""
        if not section or section == DEFAULTSECT:
            option = self.optionxform(option)
            return option in self._defaults
        elif section not in self._sections:
            return False
        else:
            option = self.optionxform(option)
            return (option in self._sections[section]
                    or option in self._defaults)

    def set(self, section, option, value=None):
        """Set an option."""
        if not section or section == DEFAULTSECT:
            sectdict = self._defaults
        else:
            try:
                sectdict = self._sections[section]
            except KeyError:
                raise NoSectionError(section)
        sectdict[self.optionxform(option)] = value

    def write(self, fp):
        """Write an .ini-format representation of the configuration state."""
        if self._defaults:
            fp.write("[%s]\n" % DEFAULTSECT)
            for (key, value) in self._defaults.items():
                fp.write("%s = %s\n" % (key, str(value).replace('\n', '\n\t')))
            fp.write("\n")
        for section in self._sections:
            fp.write("[%s]\n" % section)
            for (key, value) in self._sections[section].items():
                if key == "__name__":
                    continue
                if (value is not None) or (self._optcre == self.OPTCRE):
                    key = " = ".join((key, str(value).replace('\n', '\n\t')))
                fp.write("%s\n" % (key))
            fp.write("\n")

    def remove_option(self, section, option):
        """Remove an option."""
        if not section or section == DEFAULTSECT:
            sectdict = self._defaults
        else:
            try:
                sectdict = self._sections[section]
            except KeyError:
                raise NoSectionError(section)
        option = self.optionxform(option)
        existed = option in sectdict
        if existed:
            del sectdict[option]
        return existed

    def remove_section(self, section):
        """Remove a file section."""
        existed = section in self._sections
        if existed:
            del self._sections[section]
        return existed

    #
    # Regular expressions for parsing section headers and options.
    #
    SECTCRE = re.compile(
        r'\['                                 # [
        r'(?P<header>[^]]+)'                  # very permissive!
        r'\]'                                 # ]
        )
    OPTCRE = re.compile(
        r'(?P<option>[^:=\s][^:=]*)'          # very permissive!
        r'\s*(?P<vi>[:=])\s*'                 # any number of space/tab,
                                              # followed by separator
                                              # (either : or =), followed
                                              # by any # space/tab
        r'(?P<value>.*)$'                     # everything up to eol
        )
    OPTCRE_NV = re.compile(
        r'(?P<option>[^:=\s][^:=]*)'          # very permissive!
        r'\s*(?:'                             # any number of space/tab,
        r'(?P<vi>[:=])\s*'                    # optionally followed by
                                              # separator (either : or
                                              # =), followed by any #
                                              # space/tab
        r'(?P<value>.*))?$'                   # everything up to eol
        )

    def _read(self, fp, fpname):
        """Parse a sectioned setup file.

        The sections in setup file contains a title line at the top,
        indicated by a name in square brackets (`[]'), plus key/value
        options lines, indicated by `name: value' format lines.
        Continuations are represented by an embedded newline then
        leading whitespace.  Blank lines, lines beginning with a '#',
        and just about everything else are ignored.
        """
        cursect = None                        # None, or a dictionary
        optname = None
        lineno = 0
        e = None                              # None, or an exception
        while True:
            line = fp.readline()
            if not line:
                break
            lineno = lineno + 1
            # comment or blank line?
            if line.strip() == '' or line[0] in '#;':
                continue
            if line.split(None, 1)[0].lower() == 'rem' and line[0] in "rR":
                # no leading whitespace
                continue
            # continuation line?
            if line[0].isspace() and cursect is not None and optname:
                value = line.strip()
                if value:
                    cursect[optname].append(value)
            # a section header or option header?
            else:
                # is it a section header?
                mo = self.SECTCRE.match(line)
                if mo:
                    sectname = mo.group('header')
                    if sectname in self._sections:
                        cursect = self._sections[sectname]
                    elif sectname == DEFAULTSECT:
                        cursect = self._defaults
                    else:
                        cursect = self._dict()
                        cursect['__name__'] = sectname
                        self._sections[sectname] = cursect
                    # So sections can't start with a continuation line
                    optname = None
                # no section header in the file?
                elif cursect is None:
                    raise MissingSectionHeaderError(fpname, lineno, line)
                # an option line?
                else:
                    mo = self._optcre.match(line)
                    if mo:
                        optname, vi, optval = mo.group('option', 'vi', 'value')
                        optname = self.optionxform(optname.rstrip())
                        # This check is fine because the OPTCRE cannot
                        # match if it would set optval to None
                        if optval is not None:
                            if vi in ('=', ':') and ';' in optval:
                                # ';' is a comment delimiter only if it follows
                                # a spacing character
                                pos = optval.find(';')
                                if pos != -1 and optval[pos-1].isspace():
                                    optval = optval[:pos]
                            optval = optval.strip()
                            # allow empty values
                            if optval == '""':
                                optval = ''
                            cursect[optname] = [optval]
                        else:
                            # valueless option handling
                            cursect[optname] = optval
                    else:
                        # a non-fatal parsing error occurred.  set up the
                        # exception but keep going. the exception will be
                        # raised at the end of the file and will contain a
                        # list of all bogus lines
                        if not e:
                            e = ParsingError(fpname)
                        e.append(lineno, repr(line))
        # if any parsing errors occurred, raise an exception
        if e:
            raise e

        # join the multi-line values collected while reading
        all_sections = [self._defaults]
        all_sections.extend(self._sections.values())
        for options in all_sections:
            for name, val in options.items():
                if isinstance(val, list):
                    options[name] = '\n'.join(val)

import UserDict as _UserDict

class _Chainmap(_UserDict.DictMixin):
    """Combine multiple mappings for successive lookups.

    For example, to emulate Python's normal lookup sequence:

        import __builtin__
        pylookup = _Chainmap(locals(), globals(), vars(__builtin__))
    """

    def __init__(self, *maps):
        self._maps = maps

    def __getitem__(self, key):
        for mapping in self._maps:
            try:
                return mapping[key]
            except KeyError:
                pass
        raise KeyError(key)

    def keys(self):
        result = []
        seen = set()
        for mapping in self._maps:
            for key in mapping:
                if key not in seen:
                    result.append(key)
                    seen.add(key)
        return result

class ConfigParser(RawConfigParser):

    def get(self, section, option, raw=False, vars=None):
        """Get an option value for a given section.

        If `vars' is provided, it must be a dictionary. The option is looked up
        in `vars' (if provided), `section', and in `defaults' in that order.

        All % interpolations are expanded in the return values, unless the
        optional argument `raw' is true. Values for interpolation keys are
        looked up in the same manner as the option.

        The section DEFAULT is special.
        """
        sectiondict = {}
        try:
            sectiondict = self._sections[section]
        except KeyError:
            if section != DEFAULTSECT:
                raise NoSectionError(section)
        # Update with the entry specific variables
        vardict = {}
        if vars:
            for key, value in vars.items():
                vardict[self.optionxform(key)] = value
        d = _Chainmap(vardict, sectiondict, self._defaults)
        option = self.optionxform(option)
        try:
            value = d[option]
        except KeyError:
            raise NoOptionError(option, section)

        if raw or value is None:
            return value
        else:
            return self._interpolate(section, option, value, d)

    def items(self, section, raw=False, vars=None):
        """Return a list of tuples with (name, value) for each option
        in the section.

        All % interpolations are expanded in the return values, based on the
        defaults passed into the constructor, unless the optional argument
        `raw' is true.  Additional substitutions may be provided using the
        `vars' argument, which must be a dictionary whose contents overrides
        any pre-existing defaults.

        The section DEFAULT is special.
        """
        d = self._defaults.copy()
        try:
            d.update(self._sections[section])
        except KeyError:
            if section != DEFAULTSECT:
                raise NoSectionError(section)
        # Update with the entry specific variables
        if vars:
            for key, value in vars.items():
                d[self.optionxform(key)] = value
        options = d.keys()
        if "__name__" in options:
            options.remove("__name__")
        if raw:
            return [(option, d[option])
                    for option in options]
        else:
            return [(option, self._interpolate(section, option, d[option], d))
                    for option in options]

    def _interpolate(self, section, option, rawval, vars):
        # do the string interpolation
        value = rawval
        depth = MAX_INTERPOLATION_DEPTH
        while depth:                    # Loop through this until it's done
            depth -= 1
            if value and "%(" in value:
                value = self._KEYCRE.sub(self._interpolation_replace, value)
                try:
                    value = value % vars
                except KeyError, e:
                    raise InterpolationMissingOptionError(
                        option, section, rawval, e.args[0])
            else:
                break
        if value and "%(" in value:
            raise InterpolationDepthError(option, section, rawval)
        return value

    _KEYCRE = re.compile(r"%\(([^)]*)\)s|.")

    def _interpolation_replace(self, match):
        s = match.group(1)
        if s is None:
            return match.group()
        else:
            return "%%(%s)s" % self.optionxform(s)


class SafeConfigParser(ConfigParser):

    def _interpolate(self, section, option, rawval, vars):
        # do the string interpolation
        L = []
        self._interpolate_some(option, L, rawval, section, vars, 1)
        return ''.join(L)

    _interpvar_re = re.compile(r"%\(([^)]+)\)s")

    def _interpolate_some(self, option, accum, rest, section, map, depth):
        if depth > MAX_INTERPOLATION_DEPTH:
            raise InterpolationDepthError(option, section, rest)
        while rest:
            p = rest.find("%")
            if p < 0:
                accum.append(rest)
                return
            if p > 0:
                accum.append(rest[:p])
                rest = rest[p:]
            # p is no longer used
            c = rest[1:2]
            if c == "%":
                accum.append("%")
                rest = rest[2:]
            elif c == "(":
                m = self._interpvar_re.match(rest)
                if m is None:
                    raise InterpolationSyntaxError(option, section,
                        "bad interpolation variable reference %r" % rest)
                var = self.optionxform(m.group(1))
                rest = rest[m.end():]
                try:
                    v = map[var]
                except KeyError:
                    raise InterpolationMissingOptionError(
                        option, section, rest, var)
                if "%" in v:
                    self._interpolate_some(option, accum, v,
                                           section, map, depth + 1)
                else:
                    accum.append(v)
            else:
                raise InterpolationSyntaxError(
                    option, section,
                    "'%%' must be followed by '%%' or '(', found: %r" % (rest,))

    def set(self, section, option, value=None):
        """Set an option.  Extend ConfigParser.set: check for string values."""
        # The only legal non-string value if we allow valueless
        # options is None, so we need to check if the value is a
        # string if:
        # - we do not allow valueless options, or
        # - we allow valueless options but the value is not None
        if self._optcre is self.OPTCRE or value:
            if not isinstance(value, basestring):
                raise TypeError("option values must be strings")
        if value is not None:
            # check for bad percent signs:
            # first, replace all "good" interpolations
            tmp_value = value.replace('%%', '')
            tmp_value = self._interpvar_re.sub('', tmp_value)
            # then, check if there's a lone percent sign left
            if '%' in tmp_value:
                raise ValueError("invalid interpolation syntax in %r at "
                                "position %d" % (value, tmp_value.find('%')))
        ConfigParser.set(self, section, option, value)

Bunu upload etmezsem sorunum çözülür mü?
 
En son bir moderatör tarafından düzenlenmiş:
Yok onu upload edin. Sistemin çalışması için gerekli.
Galiba hangi dosyaya kayıt olduğunu buldum. intrologin.py dosyanızı biraz daha inceledim ve python2222.dll şu dosyanın içine kayıt oluyor. Bunu otopack crclist içinden çıkartınız.
 
Çözüm
Yok onu upload edin. Sistemin çalışması için gerekli.
Galiba hangi dosyaya kayıt olduğunu buldum. intrologin.py dosyanızı biraz daha inceledim ve python2222.dll şu dosyanın içine kayıt oluyor. Bunu otopack crclist içinden çıkartınız.

Gerçekten çok teşekkür ederim sonunda çözüldü "Python2222.dll" içine kaydediliyormuş account'lar.
 
Önemli değil. :) Bildiğim kadarıyla yardımcı olmaya uğraşıyorum. Sabır gösterip çözüme ulaşmamızda yardımcı olduğunuz için bende size teşekkür ederim.

Çözüldüğüne göre bu konunun başlığını çözüldü işaretleyip kilitliyorum. İyi çalışmalar dilerim. :)
 
Durum
İçerik kilitlendiği için mesaj gönderimine kapatıldı.
Geri
Üst