Вы можете использовать os.path.join(zipped_files_dir, folder)
в функции get_folder_directories
:
import zipfile
import os
import sys
zipped_files_dir = 'Z:\Dev\some_files'
def get_folder_names():
path_list = []
for folder_name in os.listdir(zipped_files_dir):
path_list.append(folder_name)
return path_list
def get_folder_directories(folder_list):
for folder in folder_list:
pathname = os.path.abspath(os.path.join(zipped_files_dir, folder))
print(pathname)
def main():
get_folder_directories(get_folder_names())
Или path_list.append(os.path.join(zipped_files_dir, folder_name))
в get_folder_names()
:
import zipfile
import os
import sys
zipped_files_dir = 'Z:\Dev\some_files'
def get_folder_names():
path_list = []
for folder_name in os.listdir(zipped_files_dir):
path_list.append(os.path.join(zipped_files_dir, folder_name))
return path_list
def get_folder_directories(folder_list):
for folder in folder_list:
pathname = os.path.abspath(folder)
print(pathname)
def main():
get_folder_directories(get_folder_names())