Created
December 6, 2010 03:38
-
-
Save alice1017/729804 to your computer and use it in GitHub Desktop.
.pycファイルを削除する
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
#coding:utf-8 | |
"""This Module is delete .pyc-files. | |
Usage:: | |
python index.py | |
""" | |
import os | |
flist = os.listdir(os.getcwd()) | |
for i in range(len(flist)): | |
root = flist[i].split(".") | |
ext = root[1] | |
if ( ext == "pyc" ): | |
cmd = "rm "+str(flist[i]) | |
os.system(cmd) | |
print "the end." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment