from concurrent import futures import os import re import sys import multiprocessing from os.path import basename from os.path import dirname inline = sys.stdin.readlines() cleaninline = [s.replace('\n', '') for s in inline] def sipper(n): #yTrunc = re.sub(r'....$', "", cleaninline) dirpath = dirname(n) os.system("cd \"" + dirpath + "\"" + "; unrar e \"" + n + "\"" ) def main(): with futures.ProcessPoolExecutor() as executor: for number, prime in zip(cleaninline, executor.map(sipper, cleaninline)): print('huzzah!') if __name__ == '__main__': main()