ã¡ã¢ã§ããã³ã¡ã³ããæ°ãããæè¿ã¤ã³ãã³ããã¹ãã¼ã¹2åã«ãªãã¤ã¤ããã import os import sys import re def main(): if len(sys.argv) != 3: print 'syntax:\n scriptname directory ext1|ext2|...' return iter = os.walk(sys.argv[1]) re_ext = re.compile(r'^\.(%s)$' % sys.argv[2]) count = 0 file_count = 0 for current, dirs, files in iter: for fn in files: base, ext = os.path.splitext(fn) if re_ext.match(ext): file_count += 1 f = open(os.pat
{{#tags}}- {{label}}
{{/tags}}