On Tue, Apr 20, 2010 at 5:44 PM, M.-A. Lemburg <mal at egenix.com> wrote: [..] > > They typically use the 'longest match wins' strategy and then > use the match extension as file extension. A split from the first right dot is also fine with me: >>> os.path.splitext('file.tar.gz', longest_match=True) ('file', '.tar.gz') Tarek