If you're looking for the Python3 equivalent of that command, I believe I 
found your answer here <https://stackoverflow.com/a/1857/15452572>

In short, it's the *platform 
<https://docs.python.org/3/library/platform.html>* library, *platform.system 
<https://docs.python.org/3/library/platform.html#platform.system>* gives 
the OS and *platform.release 
<https://docs.python.org/3/library/platform.html#platform.release>* gives 
the version.
Alternatively, there's the *os 
<https://docs.python.org/3/library/os.html#os.name> *library and the *sys 
<https://docs.python.org/3/library/sys.html#sys.platform>* library.

On Wednesday, December 22, 2021 at 6:52:11 AM UTC+1 sa...@visiblebox.com 
wrote:

> Hi,
>
> Python 2,7 had the option to specify run time environment as follows:
>
> if os.getenv('SERVER_SOFTWARE', '').startswith('Google App Engine/'):
>   # Production
> else:
>   # Local development server
>
> The above does not seem to work in Python 3. Is there an equivalent in 
> python 3 for the same?
>
> Thanks
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/75919109-89ea-4bce-8c44-82939d457301n%40googlegroups.com.

Reply via email to