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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? utils.py

?? Progra,, das sehr viele Medien formate spielt und sehr bekannt ist.
?? PY
字號:
#!/usr/bin/python# -*- coding: utf-8 -*-# utils.py#  #  Author: Laudeci Oliveira <laudeci@gmail.com>#          Rafael Proen莽a   <cypherbios@ubuntu.com># #  This program is free software; you can redistribute it and/or #  modify it under the terms of the GNU General Public License as #  published by the Free Software Foundation; either version 2 of the#  License, or (at your option) any later version.# #  This program is distributed in the hope that it will be useful,#  but WITHOUT ANY WARRANTY; without even the implied warranty of#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the#  GNU General Public License for more details.# #  You should have received a copy of the GNU General Public License#  along with this program; if not, write to the Free Software#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307#  USAimport apt_instimport apt_pkgimport gtkimport mathimport fnmatchimport osimport pygtkimport shutilimport urllibimport gnomevfsimport reimport tarfileimport bz2import configdef isValidFileName(filename):    try:        p=re.compile('[^0-9A-Za-z_\+\.,-]+')        if p.search(filename):            return False        else:            return True    except:        return False    def updateUI():    while gtk.events_pending(): gtk.main_iteration() #  Do case insensitive wildcard search on column 1.def TreeViewSearch( model, column, key, it, data):    key, title = key.lower(), model.get_value(it, column).lower()    return title.find(key) == -1        def getCDROM():    vol_monitor =  gnomevfs.VolumeMonitor()    volume = gnomevfs.Volume()    drives = []    for volume in vol_monitor.get_mounted_volumes():        if volume.get_hal_udi() != None:            vol_type = volume.get_device_type()            if vol_type == gnomevfs.DEVICE_TYPE_CDROM or vol_type == gnomevfs.DEVICE_TYPE_VIDEO_DVD:                drives.append(volume.get_drive())        return drives            def packageTooltip(widget, e, tooltips, cell, emptyText="no information"):     """ If emptyText is None, the cursor has to enter widget from a side that contains an item, otherwise no tooltip will be displayed. """     try:         (path, col, x, y) = widget.get_path_at_pos(int(e.x), int(e.y))         it = widget.get_model().get_iter(path)         value = widget.get_model().get_value(it, config.C_PKG)         tooltips.set_tip(widget, value.get_pkg_ShortDescription())         tooltips.enable()     except:         tooltips.set_tip(widget, emptyText)            def checkAccess(path):    """Checks file/folder permissions and returns True if the file/folder could be accessed"""    mRet = False    if pathExists(path):        if os.access(path, os.R_OK | os.W_OK | os.X_OK):            mRet = True        return mRetdef copyFile(source , destination):    try:        dest = os.path.dirname(destination)        if not pathExists(dest):            mkdir(dest)                shutil.copyfile(source , destination)    except Exception , e :        print str(e)def delFile( path):    """ Deletes a file if it exists"""    if fileExist(path):        os.remove(path)    def removePath( path):    """ Removes a directory path """    try:        shutil.rmtree(path, ignore_errors=True)    except:        pass        def pathExists( path):    """Returns True if a path exists."""    return os.path.isdir(path)    def fileExist( path):    """Returns True if a file exist."""    return os.path.isfile(path)    def mkdir( path, removeExisting = False):    """ Create a full path, directory by directory"""    #remove directiory if already exists    if removeExisting:        if pathExists(path):            removePath(path)                    dirs = path.split("/")    dir = ""            for dirname in dirs:        dir += dirname + "/"        if not os.path.isdir(dir) and len(dir)>0:            os.mkdir(dir)            def TimeFormat(value):    #get days        fDays = (value / 86400)    tModDay = math.modf(fDays)    Days = int(tModDay[1])    decimalDays =tModDay[0]        fTimeHour = decimalDays  * 24     # Extract decimal from integer part    tModHour = math.modf(fTimeHour)    nHour = int(tModHour[1])    fDecimalHour = tModHour[0]        # Transform decimal in minutes    fMinute = fDecimalHour*60    # Again, extract the decimal and the integer part    tModMinute = math.modf(fMinute)    nMinute = int(tModMinute[1])    fDecimalMinute = tModMinute[0]    # Transform decimal in seconds    fSecond = fDecimalMinute*60        # Again, extract the decimal and the integer part    tModSecond = math.modf(fSecond)    nSecond = int(tModSecond[1])            output=''    if Days >0:        output = '%id' % Days    if nHour >0:        output+='%ih' % nHour        if nMinute >0:        output+='%im' % nMinute        output+='%is' % nSecond        return outputdef fileSizeFormat( i):    """        Taken from jinja        Format the value like a 'human-readable' file size (i.e. 13 KB, 4.1 MB,        102 bytes, etc).    """    bytes = float(i)    if bytes < 1024:        return u"%d Byte%s" % (bytes, bytes != 1 and u's' or u'')    elif bytes < 1024 * 1024:        return u"%.1f KB" % (bytes / 1024)    elif bytes < 1024 * 1024 * 1024:        return u"%.1f MB" % (bytes / (1024 * 1024))    else:        return u"%.1f GB" % (bytes / (1024 * 1024 * 1024)) def openSelectDialog(title, filterName, pattern, selectMultiple = False):            file_open = gtk.FileChooserDialog(title=title,                           action=gtk.FILE_CHOOSER_ACTION_OPEN,                           buttons=(gtk.STOCK_CANCEL,                           gtk.RESPONSE_CANCEL,                           gtk.STOCK_OPEN, gtk.RESPONSE_OK))    filter = gtk.FileFilter()    filter.set_name(filterName)    filter.add_pattern(pattern)    file_open.add_filter(filter)    file_open.set_select_multiple(selectMultiple)            result = ""    path = ""    filename = ""    if file_open.run() == gtk.RESPONSE_OK:        file_open.hide()        results = file_open.get_filenames()        file_open.destroy()        return gtk.RESPONSE_OK, results    else:        file_open.destroy()        return gtk.RESPONSE_CANCEL, []        def getFilePathFromUrl( uri):     """ helper to get a useful path from a drop uri"""     path = urllib.url2pathname(uri) # escape special chars     path = path.strip('\r\n\x00') # remove \r\n and NULL     # get the path to file     if path.startswith('file:\\\\\\'): # windows         path = path[8:] # 8 is len('file:///')     elif path.startswith('file://'): # nautilus, rox         path = path[7:] # 7 is len('file://')     elif path.startswith('file:'): # xffm         path = path[5:] # 5 is len('file:')     return path          class cursorManager:	def __init__(self):		self.window = None	#procedure to change window cursor to ready cursor	def setBusy(self, window_main = None, flag = True):		""" Show a watch cursor if the app is busy for more than 0.3 sec.		Furthermore provide a loop to handle user interface events """		if window_main is None:			return		self.window = window_main.window		if flag == True:			try:				self.window.set_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH))			except:				print "An error occured changing cursor"		else:			self.window.set_cursor(None)			while gtk.events_pending():				gtk.main_iteration()		return    class ContextMenu(gtk.Menu):    def __init__(self, *args):        gtk.Menu.__init__(self)        self.menuItem = None             def addMenuItem(self,menuName,actionFunction= None):                if menuName == "-":            self.menuItem = gtk.SeparatorMenuItem()        else:             self.menuItem = gtk.MenuItem(menuName)            if actionFunction is not None :                self.menuItem.connect("activate", actionFunction)        self.menuItem.show()        self.append(self.menuItem)        return    class SystemInfo:    def __init__(self):        self.distro = ''        self.architecture = ''        self.codename = ''        self.release = ''        self.read_release_info()            def read_release_info(self):        self.get_infos()        self.architecture = self.__architecture()       def get_infos(self):          try:            p = open('/etc/lsb-release','r')            for line in p:                if 'DISTRIB_ID' in line:                    self.distro = line.split('=')[-1].replace('\n','').lower()                elif 'DISTRIB_CODENAME' in line:                    self.codename = line.split('=')[-1].replace('\n','').lower()                elif 'DISTRIB_RELEASE' in line:                    self.release = line.split('=')[-1].replace('\n','').lower()            p.close()        except:            pass    def __architecture(self):        """        Detect whether the architecture is x86/ppc/amd64        """        arch = os.uname()[-1]        if arch in ('ppc', 'ppc64'):            arch = 'powerpc'        elif arch in ('sparc32','sparc64','sparc'):            arch = 'sparc'        elif arch =='x86_64':            if self.distro in ('debian'):                arch = 'ia64'            else:                arch = 'amd64'        elif arch in ('i386','i686','i586','k7'):            arch = 'i386'        return arch        class RecursiveSearch:    def __init__(self, directory, pattern="*"):        self.stack = [directory]        self.pattern = pattern        self.files = []        self.index = 0    def __getitem__(self, index):        while 1:            try:                file = self.files[self.index]                self.index = self.index + 1            except IndexError:                # pop next directory from stack                self.directory = self.stack.pop()                self.files = os.listdir(self.directory)                self.index = 0            else:                # got a filename                fullname = os.path.join(self.directory, file)                if os.path.isdir(fullname) and not os.path.islink(fullname):                    self.stack.append(fullname)                if fnmatch.fnmatch(file, self.pattern):                    return fullname                    def compress(source, dest):    dest_ext = '.bz2'    arcname = os.path.basename (source)    dest_name = '%s%s' % (dest, dest_ext)    dest_path = os.path.join(dest, dest_name)    input = bz2.compress(file(source, 'r').read())    out = file(dest_path,'w')    out.write(input)    out.close()    return dest_path

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩免费视频| 亚洲一区二区精品久久av| 亚洲国产日韩综合久久精品| 色婷婷精品大在线视频| 亚洲免费三区一区二区| 日本韩国精品在线| 高清在线观看日韩| 国产精品毛片大码女人| 成人ar影院免费观看视频| 中文字幕一区不卡| 欧美性猛交xxxx乱大交退制版| 亚洲综合网站在线观看| 日韩免费高清视频| 青青草97国产精品免费观看 | 99精品偷自拍| 亚洲va国产va欧美va观看| 日韩欧美一级二级三级久久久| 日本不卡视频在线观看| 国产欧美一区二区三区网站| 在线看日本不卡| 麻豆91在线播放| 国产女同性恋一区二区| 欧美猛男男办公室激情| 成人av在线电影| 极品销魂美女一区二区三区| 亚洲欧美aⅴ...| 欧美精品一区二区久久婷婷 | 欧美视频日韩视频| 国产成都精品91一区二区三 | 久久网站最新地址| 91豆麻精品91久久久久久| 国产综合色精品一区二区三区| 亚洲国产aⅴ天堂久久| 久久精品一区四区| 日韩一卡二卡三卡四卡| 欧美熟乱第一页| 91蜜桃网址入口| 成人精品视频一区二区三区尤物| 精品一区二区三区久久久| 亚洲成人动漫av| 亚洲第一福利一区| 亚洲精品高清在线| 一二三区精品福利视频| 一区二区三区四区亚洲| 亚洲综合清纯丝袜自拍| 亚洲精品视频在线观看免费| 国产精品久久久久久久久快鸭| 精品国产精品一区二区夜夜嗨| 91精品国产全国免费观看| 7777精品伊人久久久大香线蕉| 欧美午夜精品电影| 欧美日韩一区三区四区| 在线观看91av| 日韩欧美国产小视频| 久久无码av三级| 综合久久综合久久| 亚洲国产精品久久艾草纯爱| 日本怡春院一区二区| 狠狠色丁香久久婷婷综合丁香| 国产乱码字幕精品高清av| 成人黄色软件下载| 欧美日韩精品专区| 精品国产百合女同互慰| 中文字幕在线观看一区| 午夜视频久久久久久| 韩国av一区二区三区在线观看| 91黄色免费网站| 精品少妇一区二区三区日产乱码 | 国产精品亚洲专一区二区三区| 91国产成人在线| 看片网站欧美日韩| 欧美一区二区三区喷汁尤物| 日韩一区二区三区四区| 中文在线资源观看网站视频免费不卡| 国产亚洲成av人在线观看导航| 国产精品成人免费| 久久精品理论片| 欧美日韩一级视频| 一级精品视频在线观看宜春院| 国产一区二区在线免费观看| 3d成人h动漫网站入口| 综合久久久久综合| 欧美亚洲一区二区在线观看| 色婷婷香蕉在线一区二区| 欧美日韩一级黄| 日韩av在线播放中文字幕| 在线观看av一区| 一区二区三区视频在线看| 色婷婷国产精品久久包臀| 亚洲国产激情av| 99精品桃花视频在线观看| 亚洲免费在线电影| www.亚洲免费av| 国产精品黄色在线观看| 国产成人免费在线视频| 久久亚洲精品国产精品紫薇| 丝袜美腿成人在线| 欧美成人一级视频| 国产在线精品免费av| 国产偷国产偷亚洲高清人白洁| 成人性生交大片免费看中文| 欧美国产精品中文字幕| av高清久久久| 亚洲黄色在线视频| 欧美日韩免费观看一区三区| 日韩激情一二三区| 久久一二三国产| 99精品欧美一区二区三区综合在线| 国产精品福利一区二区三区| 欧美亚洲一区二区在线观看| 免费成人结看片| 国产精品毛片a∨一区二区三区| 91啪亚洲精品| 久久99精品国产麻豆婷婷| 国产精品日韩精品欧美在线| 欧美日韩一级二级| 国产精品1024| 日韩精品一二三四| 亚洲欧洲av一区二区三区久久| 欧美日韩精品一区二区三区蜜桃 | 亚洲欧洲成人自拍| 日韩三级高清在线| 色猫猫国产区一区二在线视频| 免费不卡在线视频| 自拍偷拍亚洲激情| 欧美白人最猛性xxxxx69交| 色综合久久天天综合网| 国产一区二区精品在线观看| 亚洲国产精品一区二区www在线| 久久久三级国产网站| 欧美剧情片在线观看| 不卡免费追剧大全电视剧网站| 麻豆精品视频在线| 日日噜噜夜夜狠狠视频欧美人 | 日本韩国一区二区三区| 国产成人精品网址| 久久狠狠亚洲综合| 捆绑紧缚一区二区三区视频| 亚洲不卡一区二区三区| 亚洲综合偷拍欧美一区色| 亚洲婷婷综合久久一本伊一区| 国产精品久久久99| 成人欧美一区二区三区小说| 中文字幕中文字幕中文字幕亚洲无线| 精品久久一二三区| 久久精品在线免费观看| 国产精品电影院| 亚洲国产精品欧美一二99 | 国产亚洲美州欧州综合国| 国产亚洲欧洲997久久综合| 久久日韩粉嫩一区二区三区| 久久久影院官网| 国产三级精品视频| 中文字幕一区二区三| 综合电影一区二区三区| 亚洲在线免费播放| 蜜桃一区二区三区四区| 国产激情一区二区三区| 95精品视频在线| 日韩欧美一区二区免费| 久久日韩精品一区二区五区| 中文字幕亚洲视频| 免费成人av在线播放| 成人免费的视频| 欧美电影一区二区| 成人欧美一区二区三区小说| 日韩av中文字幕一区二区三区| 国产乱码一区二区三区| 99国产精品久| 久久久久久久久久久99999| 亚洲综合成人在线视频| 国产精品中文欧美| 日韩欧美资源站| 一区二区高清免费观看影视大全| 日韩精品福利网| 99久久精品国产精品久久| 日韩欧美国产1| 一卡二卡三卡日韩欧美| 国产精品888| 欧美成人免费网站| 免费成人小视频| 欧美精品一二三四| 亚洲欧美另类在线| 成人永久免费视频| 久久精品视频一区二区三区| 日韩精品国产欧美| 欧美人伦禁忌dvd放荡欲情| 亚洲一区在线观看免费观看电影高清 | 欧美午夜精品免费| 亚洲欧美偷拍三级| thepron国产精品| 欧美极品另类videosde| 国产毛片精品视频| 国产亚洲欧美在线| 成人精品视频一区二区三区| 亚洲欧洲在线观看av| 一本大道久久a久久综合婷婷| 中文字幕制服丝袜一区二区三区| 成人免费视频app| 亚洲毛片av在线|