How to get the filename without the extension from a path in Python?
For instance, if I had "/path/to/some/file.txt", I would want "
"/path/to/some/file.txt"
"
But even when I import os, I am not able to call it path.basename. Is it possible to call it as directly as basename?
import os, and then use os.path.basename
import os
os.path.basename
importing os doesn't mean you can use os.foo without referring to os.
import
os
os.foo