hadoop - get filename and extension of files in hdfs with Python -


is there equivalent of os module in python read filesystem (hadoop 2.6)?

in particular interested getting extension of file , base name (not including full path).

no need "an equivalent", os.path.basename same hdfs.

i.e.:

import os.path path print path.basename("/path/to/file.txt") # file.txt 

os.path — common pathname manipulations


Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -