Hello how can I get the file name with os.path lib? For example:
C:\Users\filippo\Desktop\K.java I want the K without the extension file
I suggest you use the splitext and basename functions from os.path
K, ext = os.path.splitext(os.path.basename(my_path)) See the docs here.