Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python find directory of file

import os
  
print('File name :    ', os.path.basename(__file__))
print('Directory Name:     ', os.path.dirname(__file__))
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #python #find #directory #file
ADD COMMENT
Topic
Name
2+5 =