Recently prepared to knock the "Thinginginjava" (people are more stupid, can only use this simple and rough method, haha)
You have to import the Net.mindview package
Import process Reference this blog: http://blog.sina.com.cn/s/blog_631a75580100vcig.html
In the middle of all the files in the Com.mindview to delete
Wrote a primitive Python script that was deleted in bulk
Since this is the first time to write scripts for your own convenience (which may also be the meaning of the script), remember
Here's the code:
Import Reimport osdef hand1 (curdir): for file_name in Os.listdir (curdir):p rint file_nameif (file_name!= ' hand.py '): Hand2 (file_name) def hand2 (file_name): fp = open (file_name, ' R ') Alllines=fp.readlines () Fp.closefp=open (file_name, ' W ') for Eachline in Alllines:a=re.sub (' Net.mindview. ', ' ", Eachline) Fp.writelines (a) fp.closeif __name__==" __main__ ": Hand1 ( Os.path.abspath ('. '))
Python Bulk Modify File script