Can a Python script detect it is running in repl.it?
boukeas

Is it possible for a Python script to check if it is running within repl.it?

You are viewing a single comment. View All
Answered by Vandesm14 [earned 5 cycles]
View Answer
Andy_4sberg

detect if directory /home/runner exists, it isn't likely for it to exist on some other device, but it does on repl.it. For it to exist on another device would mean that device is linux/unix based with the username of a user as "runner". Example: