[ create a new paste ] login | about

Project: fedecarg
Link: http://fedecarg.codepad.org/PK73AbuT    [ raw code | output | fork ]

Python, pasted on Jun 10:
1
2
3
4
5
6
7
8
9
10
11
12
import os, sys
def pyc_clean(dir):
    findcmd = 'find %s -name "*.pyc" -print' % dir
    count = 0
    for f in os.popen(findcmd).readlines():
        count += 1
        print str(f[:-1])
        os.remove(str(f[:-1]))
    print "Removed %d .pyc files" % count 
if __name__ ==
    "__main__":    
    pyc_clean(".")


Output:
1
2
3
4
  Line 10
    if __name__ ==
                 ^
SyntaxError: invalid syntax


Create a new paste based on this one


Comments: