Skip to content
Snippets Groups Projects
Commit dbaf22b0 authored by Ravi Tripathi's avatar Ravi Tripathi
Browse files

Adding features to clean_env to remove unuseful files and directories

parent abb81115
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/python #!/usr/bin/python
import os
import shutil import shutil
def rm_test_dir(): def rm_test_dir():
shutil.rmtree('test_dir') cwd = os.getcwd()
for filename in os.listdir(cwd):
if not (filename.endswith("_env") or filename.endswith("_script")):
if os.path.isfile(filename):
os.remove(filename)
else:
shutil.rmtree(filename)
if __name__=="__main__": if __name__=="__main__":
rm_test_dir() rm_test_dir()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment