[wxPython] How to get filename

Hi,
How can I get a filename from a full path?

For example I have
C:\Python\MyFile.txt
and I need to get MyFile.txt only.

I tried wxFileName class but Python said
NameError: name 'wxFileName' is not defined
Thank you for help.
Ladislav

A wrote:

Hi,
How can I get a filename from a full path?

import os
pathname = 'c:\\My Documents\\MyFile.txt'
filename = os.path.basename(pathname)
filename

'MyFile.txt'

wxPython tries to avoid duplicating functionality that's already in
the standard Python libs. Typically, the Python versions are easier
to use, and anyhow, it makes it less work for Robin to maintain it.
:wink:

Jeff Shannon
Technician/Programmer
Credit International