WARNING! Access to this system is limited to authorised users only.
Unauthorised users may be subject to prosecution.
Unauthorised access to this system is a criminal offence under Australian law (Federal Crimes Act 1914 Part VIA)
It is a criminal offence to:
(1) Obtain access to data without authority. -Penalty 2 years imprisonment.
(2) Damage, delete, alter or insert data without authority. -Penalty 10 years imprisonment.
User activity is monitored and recorded. Anyone using this system expressly consents to such monitoring and recording.

Commit b8d3cc26 authored by Tobias Pape's avatar Tobias Pape
Browse files

we cannot use the stdlib os.path.split* so we do our own

parent 240bd087
......@@ -171,9 +171,18 @@ class Universe(object):
# take argument of the form "../foo/Test.som" and return
# "../foo", "Test", "som"
def _get_path_class_ext(self, path):
(path, file_name) = os.path.split(path)
(file_name, ext) = os.path.splitext(file_name)
return (path, file_name, ext[1:])
path_and_file = path.rsplit(os.pathsep, 1)
if len(path_and_file) <= 1:
path = ""
else:
path = path_and_file[0]
file_and_ext = path_and_file[-1].rsplit(".", 1)
if len(file_and_ext) <= 1:
ext = ""
else:
ext = file_and_ext[-1]
file_name = file_and_ext[0]
return (path, file_name, ext)
def _print_usage_and_exit(self):
# Print the usage
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment