2008/2/1, Sam Bishop <sam at bishop.dhs.org>: - components = path.rpartition(".") + components = path.split(".")[-1] This is not correct. rpartition returns 3-tuple, for example ('test', '.', 'c') for 'test.c'. Applied, after fixing the above problem. -- Seo Sanghyeon