diff --git a/mcl_id_triples_by_blat.py b/mcl_id_triples_by_blat.py index f9eb706..6280931 100755 --- a/mcl_id_triples_by_blat.py +++ b/mcl_id_triples_by_blat.py @@ -19,10 +19,13 @@ min_space_on_scratch = 100000 #in mb; fail if less than this amount of free space def splitpath_rec(path, maxdepth=20): - ( head, tail ) = os.path.split(path) - return splitpath_rec(head, maxdepth - 1) + [ tail ] \ - if maxdepth and head and head != path \ - else [ head or tail ] + ( head, tail ) = os.path.split(path) + # make it work on python 2.6 + if maxdepth and head and head != path: + return splitpath_rec(head, maxdepth - 1) + [ tail ] + else: + return [ head or tail ] + def splitpath(path): pathli = splitpath_rec(path)