Answers for "python extract directory from path"

-2

python os get dir path

from os import getcwd # only import "getcwd" from os

getcwd() # Get the current working directory
Posted by: Guest on June-15-2020
0

extract directory python

import zipfile
inpath = MyDirPath
outpath = inpath.replace(".zip", "") # Remove zip extension so that outpath does not have .zip
        with zipfile.ZipFile(inpath, 'r') as z:
            z.extractall(outpath) # Extracts
Posted by: Guest on January-21-2021

Code answers related to "python extract directory from path"

Python Answers by Framework

Browse Popular Code Answers by Language