#!/usr/bin/python3

def make_a_file(i):
    f = "out_python/{:05d}".format(i)
    try:
        with open(f, "w") as fp:
            fp.write("hello")
        # print("wrote", f)
    except:
        print("failed on", f)


def make_a_lot_of_files(how_many):
    for i in range(how_many):
        make_a_file(i)
    return None

print(make_a_lot_of_files(100000))

@@ -12,16 +12,51 @@
 python3%0A
+import asyncio%0A%0A%0A@asyncio.coroutine
 %0Adef mak
@@ -288,16 +288,99 @@
 ny):%0A   
+ loop = asyncio.get_event_loop()%0A    tasks = %5Basyncio.ensure_future(make_a_file(i))
  for i i
@@ -400,56 +400,175 @@
 any)
-:
+%5D
 %0A    
-    make_a_file(i)%0A    return None%0A%0Aprint(
+loop.run_until_complete(asyncio.wait(tasks))%0A%0A%0Aif __name__ == %22__main__%22:%0A    from sys import argv%0A    how_many = int(argv%5B1%5D) if len(argv) == 2 else 100000%0A    
 make
@@ -587,13 +587,14 @@
 les(
-100000)
+how_many
 )%0A

Use asyncio in plain python example.