Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

with open python print file name

>>> f = open('/tmp/generic.png','r')
>>> f.name
'/tmp/generic.png'
>>> import os
>>> os.path.basename(f.name)
'generic.png'
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #open #python #print #file
ADD COMMENT
Topic
Name
6+2 =