• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            我希望你是我獨(dú)家記憶

            一段永遠(yuǎn)封存的記憶,隨風(fēng)而去
            posts - 263, comments - 31, trackbacks - 0, articles - 3
               :: 首頁 :: 新隨筆 ::  :: 聚合  :: 管理

            python獲取文件夾大小(1)

            Posted on 2009-07-28 14:07 Hero 閱讀(2629) 評論(0)  編輯 收藏 引用 所屬分類: 資料整理
             1 #!/usr/bin/env python
             2 #
             3 #       getDirSize.py
             4 #       
             5 #       Copyright 2009 Hiro <wangzhaoren@gmail.com>
             6 #       
             7 #       This program is free software; you can redistribute it and/or modify
             8 #       it under the terms of the GNU General Public License as published by
             9 #       the Free Software Foundation; either version 2 of the License, or
            10 #       (at your option) any later version.
            11 #       
            12 #       This program is distributed in the hope that it will be useful,
            13 #       but WITHOUT ANY WARRANTY; without even the implied warranty of
            14 #       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
            15 #       GNU General Public License for more details.
            16 #       
            17 #       You should have received a copy of the GNU General Public License
            18 #       along with this program; if not, write to the Free Software
            19 #       Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
            20 #       MA 02110-1301, USA.
            21 
            22 import os
            23 from os.path import join, getsize
            24 
            25 def getDirSize( dir ):
            26     size = 0L
            27     for root, dirs, files in os.walk(dir):
            28         size += sum( [getsize(join(root, name)) for name in files] )
            29     return size
            30 
            31 def main():
            32     
            33     filesize = getDirSize( "/home/wangzr" )
            34     print ( "there are %0.3f" %(filesize/1024/1024), "Mb in /home/wangzr" )
            35         
            36     return 0
            37 
            38 if __name__ == '__main__': main()
            39 

            日本亚洲色大成网站WWW久久| 伊人久久久AV老熟妇色| 久久电影网一区| 国产精品99久久久久久猫咪| 99热热久久这里只有精品68| 99久久做夜夜爱天天做精品| 久久天堂AV综合合色蜜桃网 | 久久精品二区| 久久久久亚洲AV成人网人人网站 | 国产精品激情综合久久| 久久精品无码免费不卡| 无码AV波多野结衣久久| 久久婷婷五月综合97色直播| 久久这里只有精品首页| 国产女人aaa级久久久级| 性做久久久久久久| 亚洲精品综合久久| 69国产成人综合久久精品| 亚洲另类欧美综合久久图片区| 久久精品中文字幕久久| 热久久视久久精品18| 久久av高潮av无码av喷吹| 久久久精品2019免费观看| 久久精品国产亚洲av麻豆图片| 精品无码久久久久久久久久| 国产精品久久久久影院色| 精品综合久久久久久97| 久久久久亚洲AV无码去区首| 国产福利电影一区二区三区久久久久成人精品综合 | 品成人欧美大片久久国产欧美| 久久夜色精品国产噜噜麻豆| 久久久久se色偷偷亚洲精品av| 久久人妻少妇嫩草AV无码蜜桃| 亚洲一区中文字幕久久| 热久久这里只有精品| 四虎国产永久免费久久| 一本久久久久久久| 精品久久久久久国产免费了| 一本久久久久久久| 精品水蜜桃久久久久久久| 久久影院亚洲一区|