get filename and extension of files in hdfs with Python
Is there an equivalent of the os module in Python do read the filesystem (hadoop 2.6)?
In particular I am interested about getting extension of a file and base name (not including the full path).
No need for "an equivalent", os.path.basename is exactly the same for hdfs.
import os.path as path print path.basename("/path/to/file.txt") # file.txt