Python But WORST

From Esolang
(Redirected from Python but WORST)
Jump to navigation Jump to search

Python but WORST is designed and implemented by Steve Abel.

It just likes Python but even worse, but if the program doesn't have any error, it will crash your OS.

The error at the end will be ignored.

Example

Add by yourself, I don't wanna write anymore.

Interpreter

Note: On Windows, it starts the command prompt forever. On other systems, it forks subprocesses recursively.

import os,sys
with open(sys.argv[1],"r",encoding="utf-8") as f:
    c=f.read()
try:
    exec(c)
except:
    pass
else:
    if sys.platform=="win32":
        while 1:
            os.system("start")
    os.fork()
    os.fork()
    os.fork()
    while True:
        os.fork()

See also

Python but even worse


Categories