Skip to content
Snippets Groups Projects
Commit f67a6be8 authored by Mohcine Chraibi's avatar Mohcine Chraibi
Browse files

modify file name

parent cf5391c4
Branches
Tags
No related merge requests found
Pipeline #
...@@ -30,10 +30,11 @@ if __name__ == "__main__": ...@@ -30,10 +30,11 @@ if __name__ == "__main__":
exit('usage: %s filename' % argv[0]) exit('usage: %s filename' % argv[0])
filename = argv[1] filename = argv[1]
dirname = os.path.dirname(filename) filename1, file_extension = os.path.splitext(filename)
basename = os.path.basename(filename) if file_extension != ".xml":
basename = basename.split(".")[0] + ".txt" exit('not an xml file')
output = os.path.join(dirname, basename)
output = filename1 + ".txt"
o = open(output, "w") o = open(output, "w")
# o.write("# ID frame x y z\n\n") # o.write("# ID frame x y z\n\n")
print (">> %s" % output) print (">> %s" % output)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment