Can a Python script detect it is running in

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

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

@Vandesm14 Thank you for your reply. Would it not be possible to set an environment variable in the VM, that would suggest that this is a server?

I asked this question in the context of a specific issue I am having: Essentially, this is an example of a program that would need to differentiate its behaviour depending on whether or not it is running in