Is there any way to check what platform I'm running with Python 2.7? For example using the platform module:
import platform
print platform.system()
print platform.release()
I get:
Linux
2.6.32-312-ec2
But if I read from the file /etc/issue by running a Linux command line command within Python I can get exactly what platform I'm running:
import command
print commands.getoutput('cat /etc/issue')
.
Debian GNU/Linux 6.0 \n \l
Is there any other way in Python to know that I'm running Debian GNU Linux 6.0?
sys.platormget you?python -mplatformorplatform.platform()in the code