os.listdir('/Users/liuchong/Desktop/LFW/lfw')
gibt eine Liste, die die Namen der Einträge im Verzeichnis enthält, die vom Benutzer angegeben wird. Liste basiert auf zufälligen Auswahlen.
dieses Problem zu beheben (ich weiß, dass ich zu spät bin) ist hier ein python 3
kompatiblen Code: -
import time
import os
from shutil import copyfile
def Copyfile(in_path, out_path, quantity = None):
filelist = os.listdir(in_path)
counter = 0
print("Copying to %r directory. Please wait... " % out_path)
start = time.time()
for i in range(quantity):
copyfile(filelist[i], out_path+filelist[i])
counter+=1
sys.stdout.write("\rTotal images copied : %r" % counter)
sys.stdout.flush()
end = time.time()
print("This move operation took %r seconds to run." %(end - start))
Sie bitte Ihre Einzug fixieren. –