fork download
  1. import time
  2. s = "a" * 10000
  3. f = open("test.txt", "a")
  4. for i in range(10):
  5. time.sleep(1)
  6. print(1)
  7. f.write("{}\n".format(s))
  8. f.flush()
  9. f.close()
  10.  
Runtime error #stdin #stdout #stderr 0.05s 9568KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Traceback (most recent call last):
  File "prog.py", line 3, in <module>
    f = open("test.txt", "a")
IOError: [Errno 13] Permission denied: 'test.txt'