There isn’t a built-in equivalent of GetFileBasename() in Geomatica for Python. Python has a large number of built-in functions, and has built-in functions that can be applied to return the base name without the extension.
In the example below, there are two functions you’ll need to use, basename and split. Basename will return the file name with the extension, and split will partition the string into a list using a specified delimiter.
import os data = r'c:\data\scene_01.pix' base = os.path.basename(data) print base scene_01.pix print base.split('.') ['scene_01', 'pix'] print base.split('.') scene_01
You can also group these functions together into a single line.
I hope this helps. If you have anymore questions don't hesitate to ask. Good luck with Python!