def remove(path):
try:<EOL><INDENT>if isfile(path):<EOL><INDENT>os.remove(path)<EOL><DEDENT>else:<EOL><INDENT>shutil.rmtree(path, ignore_errors=True)<EOL><DEDENT><DEDENT>except OSError:<EOL><INDENT>pass<EOL><DEDENT>
Remove file or dir if exist