亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? inianalyse.py

?? 使用python實(shí)現(xiàn)了ini文件的分析
?? PY
字號:
#the CIni class which used to extract the section and the key infomation
#history : created by liuzhibin at 2009/03/10

class CIni(object):
    __SECTION_HEAD = r'['  #the head of the section
    __SECTION_REAR = r']'  #the rear of the section
    __COMMENT_HEAD = r';'  #the head of the comment
    __KEY_EQUAL = r'='     #the equal sign which assgin the value to the key
    __EMPTY_STR = -1       #the symbol which defines the return value of Emptystr
    __NOT_CHAR_MATCH = -2  #the symbol which defines the return val of not match case
    
    def __init__(self):
        self._data = {}    #the dictionary which contains the data of ini

 
    # Function parse(self, filename)
    # Description: open and extract the infomation of ini file
    # if not success: return False 
    # if success: return True
    # Accepted Para: the file name of ini file
    def parse(self, filename):
        file = open(filename,'r')
        
        if file == None:
            return False     #open file error return error
        #the current section which the key belonged to
        _currentSection =None
        
        for eachLine in file:
            PosLineBegin =self._getPosNoneSpace(eachLine)  #get the pos of the first non-space char
            
            if (eachLine[0] ==self.__COMMENT_HEAD or PosLineBegin==len(eachLine)-1):
                pass         #comment and the empty line is not deal
            elif eachLine[0] ==self.__SECTION_HEAD:  #the section part
                PosEnd= self._getCharPos(self.__SECTION_REAR,eachLine)    #get the pos of the end of section rear
                
                if PosEnd == self.__EMPTY_STR or PosEnd ==self.__NOT_CHAR_MATCH:
                    continue    #there are error in this line skip

                SectionName = eachLine[1:PosEnd] 

                #try to get the section keys     
                _currentSection = self._data.get(SectionName)
                #if failed create a new one
                if _currentSection == None:
                    _currentSection = self._data.setdefault(SectionName,{})
                    
            else:   #the key part
                PosSplite = self._getCharPos(self.__KEY_EQUAL,eachLine)   #get the pos of symbol "=" to separate the key and the value
                _currentSection.setdefault(eachLine[0:PosSplite],eachLine[PosSplite+1:len(eachLine)-1])   #set the value to the key

        return True

    # Function read_string(self, section, ident, default = "")
    # Description: Get the specified ident of specified sction
    # if not found: return default
    # if found: return the_string
    def read_string(self, section, ident, default = ""):

        Section = self._data.get(section)
        if Section == None:
            return default
        else:
            return Section.get(ident,default)


    #the private function returns the specified char of certain string
    def _getCharPos(self,char,str):
        if str =="":
            return self.__EMPTY_STR  #if the str is empty return EMPTY_LINE     
        else:
            pos = 0
            for ch in str:
                if char ==ch:
                  return pos     #match, return current pos
                else:
                  pos+=1
        return self.__NOT_CHAR_MATCH   #none of the char match , return NOT_CHAR_MATCH

    #get the pos of first none space
    def _getPosNoneSpace(self,str):
        pos = 0
        for char in str:
            if char!=" ":
                return pos
            else:
                pos +=1
        return -1;

    #the function which display all the sections and the keys and helps to judge the result
    def _display(self):
        for section in self._data.keys():
            print "section name = ",section
            for key in self._data[section].keys():
                print "    ",key,"=",self._data[section][key]



def main():
    print "begin"
    FileName =raw_input("Please inut the ini fileName:")
    print FileName
    print "the Ini Filename is: ",FileName
    Analyser = CIni()
    if Analyser.parse(FileName) == False:
        print "analyse false"
    else:
        print "All the sections and the keys are as belowed:"
        Analyser._display()
    
    print "done"

if __name__== "__main__":
   main()

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91香蕉视频污在线| 亚洲永久精品大片| 精品一区二区在线免费观看| 欧美精品日韩一本| 亚洲一区二区三区免费视频| 色婷婷一区二区| 亚洲地区一二三色| 91麻豆精品国产91久久久久久久久| 亚洲午夜精品在线| 欧美一区二区三区在线观看| 免费在线观看日韩欧美| 精品国产伦一区二区三区免费| 精品亚洲国产成人av制服丝袜| 精品久久久久久综合日本欧美| 国产精品中文字幕一区二区三区| 久久久国产一区二区三区四区小说 | 免费在线观看日韩欧美| 久久综合丝袜日本网| 国产a视频精品免费观看| 亚洲人成网站在线| 欧美精品自拍偷拍| 国产麻豆视频一区二区| 亚洲欧洲av一区二区三区久久| 欧美专区在线观看一区| eeuss鲁片一区二区三区在线看| 综合欧美亚洲日本| 制服丝袜av成人在线看| 国产精品99久| 亚洲一级片在线观看| 欧美成人国产一区二区| thepron国产精品| 偷拍日韩校园综合在线| 国产欧美一二三区| 欧美日韩日日夜夜| 国产麻豆精品视频| 亚洲国产日韩在线一区模特 | 亚洲综合免费观看高清完整版| 在线综合+亚洲+欧美中文字幕| 国产精品亚洲综合一区在线观看| 亚洲精品日韩综合观看成人91| 日韩一级在线观看| 91在线你懂得| 国精产品一区一区三区mba桃花 | 久久久久久亚洲综合| 91成人免费在线| 国产一区二区视频在线| 亚洲h动漫在线| 中文字幕乱码久久午夜不卡 | 丝袜美腿高跟呻吟高潮一区| 日本一区二区三区国色天香| 欧美日韩精品高清| 不卡视频在线看| 国产一区二区在线观看免费| 亚洲国产色一区| 国产一区视频导航| 亚洲国产aⅴ成人精品无吗| 日本一区二区免费在线| 91精品国产综合久久蜜臀| 91麻豆免费视频| 国产成人亚洲精品狼色在线| 日韩精品一二三四| 亚洲小说欧美激情另类| 最新欧美精品一区二区三区| 久久九九国产精品| 久久综合网色—综合色88| 欧美高清视频不卡网| 在线观看一区不卡| 一本到三区不卡视频| 成熟亚洲日本毛茸茸凸凹| 国产原创一区二区三区| 免费成人你懂的| 亚洲成av人片在www色猫咪| 亚洲品质自拍视频网站| 国产欧美一区二区精品性色| 2022国产精品视频| 日韩精品专区在线影院观看| 91精品国产手机| 欧美一区二区福利在线| 在线成人午夜影院| 欧美日韩一本到| 欧美丰满高潮xxxx喷水动漫| 欧美性视频一区二区三区| 在线这里只有精品| 在线视频亚洲一区| 色女孩综合影院| 欧美在线观看视频一区二区三区| 色综合视频在线观看| 91福利区一区二区三区| 欧美性色综合网| 欧美片在线播放| 日韩一区二区在线看片| 亚洲蜜臀av乱码久久精品蜜桃| 亚洲色图清纯唯美| 亚洲国产精品久久久久秋霞影院| 亚洲制服丝袜av| 免费在线观看一区| 国产成人免费视频网站| 99re这里只有精品6| 色婷婷综合视频在线观看| 91黄视频在线| 91精品国产高清一区二区三区| 欧美一区二区视频网站| 久久久综合视频| **性色生活片久久毛片| 亚洲午夜av在线| 老司机午夜精品99久久| 国产91精品精华液一区二区三区| 粉嫩13p一区二区三区| 色婷婷香蕉在线一区二区| 欧美欧美欧美欧美| 精品99一区二区| 国产精品福利av| 三级成人在线视频| 国产精品69毛片高清亚洲| 色综合中文字幕国产| 91国产成人在线| 久久先锋影音av| 伊人一区二区三区| 精品一区二区久久久| 91丨国产丨九色丨pron| 日韩一区二区三区电影在线观看| 国产日韩影视精品| 亚洲v日本v欧美v久久精品| 国模大尺度一区二区三区| 一本色道a无线码一区v| 欧美mv和日韩mv国产网站| 中文字幕一区二区三区乱码在线| 五月天视频一区| 成人性生交大片免费看中文| 欧美精品丝袜中出| 亚洲欧美在线另类| 美国一区二区三区在线播放| 一本色道久久加勒比精品| 久久综合av免费| 亚洲综合清纯丝袜自拍| 丰满岳乱妇一区二区三区| 在线不卡中文字幕| 亚洲日本一区二区| 国产精品一区二区x88av| 精品视频一区二区不卡| 国产精品福利影院| 蜜桃一区二区三区在线观看| 色久优优欧美色久优优| 国产女主播在线一区二区| 日本中文一区二区三区| 欧美在线免费视屏| 亚洲天堂a在线| 成人免费视频caoporn| 欧美第一区第二区| 日日噜噜夜夜狠狠视频欧美人| 91在线丨porny丨国产| 国产婷婷色一区二区三区四区| 三级久久三级久久| 欧美日韩一本到| 一区二区三区鲁丝不卡| 97精品电影院| 自拍偷拍亚洲激情| 成人a区在线观看| 国产三区在线成人av| 国产精品中文字幕日韩精品| 欧美成人猛片aaaaaaa| 青青草成人在线观看| 6080日韩午夜伦伦午夜伦| 亚洲毛片av在线| 91网站在线播放| 亚洲欧美综合在线精品| av日韩在线网站| 国产精品国产精品国产专区不蜜| 国产精品456| 国产日韩欧美精品综合| 国产丶欧美丶日本不卡视频| 久久综合精品国产一区二区三区| 久久电影网站中文字幕| 日韩欧美不卡一区| 久久99精品久久只有精品| 精品乱人伦小说| 国产精品夜夜嗨| 中文字幕一区二区三区在线观看 | 久久久久久久久99精品| 国产美女主播视频一区| 午夜精品福利久久久| 欧美日韩亚洲综合在线| 日韩电影在线免费观看| 日韩一级二级三级精品视频| 美女尤物国产一区| 精品少妇一区二区三区视频免付费| 日本不卡一二三| 久久综合久久久久88| 处破女av一区二区| 一区二区三区成人在线视频| 欧美亚洲愉拍一区二区| 日本aⅴ亚洲精品中文乱码| 日韩欧美国产1| 国产jizzjizz一区二区| 亚洲免费电影在线| 欧美一区永久视频免费观看| 久久99精品一区二区三区三区| 国产午夜久久久久| 91老师国产黑色丝袜在线| 午夜影院久久久|