DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
get path to file without filename python
import os filepath = '/a/path/to/my/file.txt' os.path.dirname(filepath) # Yields '/a/path/to/my'
PREVIOUS
NEXT
Tagged:
#path
#file
#filename
#python
ADD COMMENT
Topic
COMMENT
Name
6+5 =
Submit