2 """Renames *.py.park files to *.py."""
8 """Drives the main script behavior."""
9 script_dir
= os
.path
.dirname(os
.path
.realpath(__file__
))
10 for filename
in os
.listdir(script_dir
):
11 basename
, extension
= os
.path
.splitext(filename
)
12 if basename
.startswith("Test") and extension
== '.park':
13 source_path
= os
.path
.join(script_dir
, filename
)
14 dest_path
= os
.path
.join(script_dir
, basename
)
15 sys
.stdout
.write("renaming {} to {}\n".format(
16 source_path
, dest_path
))
17 os
.rename(source_path
, dest_path
)
19 if __name__
== "__main__":