In [1]:
from ahh import ext

In [2]:
f1 = 'test.grb'
f2 = 'test2.nc'
f3 = 'test.test2.long.name.exe'
fn_end = '_something'

In [3]:
ext.append_to_fn(f1, fn_end)
ext.append_to_fn(f2, fn_end)
ext.append_to_fn(f3, fn_end)


Out[3]:
'test_something.grb'
Out[3]:
'test2_something.nc'
Out[3]:
'test.test2.long.name_something.exe'

In [ ]: