>>> import os >>> os.name 'posix' >>> import platform >>> platform.system() 'Linux' >>> platform.release() '2.6.22-15-generic'
The output of platform.system()
is as follows:
- Linux:
Linux
- Mac:
Darwin
- Windows:
Windows
See: platform
— Access to underlying platform’s identifying data
Related Posts:
- Understanding the main method of python [duplicate]
- TypeError: only integer scalar arrays can be converted to a scalar index with 1D numpy indices array
- TypeError: only integer scalar arrays can be converted to a scalar index with 1D numpy indices array
- Python Math – TypeError: ‘NoneType’ object is not subscriptable
- PermissionError: [Errno 13] in Python
- “If not” condition statement in python
- syntaxerror: “unexpected character after line continuation character in python” math
- How can I sort a dictionary by key?
- Python Logic of ListNode in Leetcode
- How can I write a `try`/`except` block that catches all exceptions?
- Plot logarithmic axes with matplotlib in python
- Error in Python script “Expected 2D array, got 1D array instead:”?
- Python Key Error=0 – Can’t find Dict error in code
- Relative imports for the billionth time
- How do I use the yfinance API in Python to get today’s DJI open?
- what does the __file__ variable mean/do?
- Pythonic way to create a long multi-line string
- Proper shebang for Python script
- ‘str’ object has no attribute ‘decode’. Python 3 error?
- How do I correctly clean up a Python object?
- Log to the base 2 in python
- Implement touch using Python?
- Python setup.py develop vs install
- How to clamp an integer to some range?
- How to extract the substring between two markers?
- Is there an operation for not less than or not greater than in python?
- Simple prime number generator in Python
- Background color for Tk in Python
- If Python is interpreted, what are .pyc files?
- How do I get monitor resolution in Python?
- What is runtime in context of Python? What does it consist of?
- Unable to convert 3d ply file image to 2d image
- Python High Pass Filter
- Where are the ampersand and vertical bar characters used in Python?
- How to draw a line with matplotlib?
- What is the maximum float in Python?
- Get all object attributes in Python?
- Normalizing a list of numbers in Python
- mport win32ui in python 3.6
- What is the correct cross-platform way to get the home directory in Python?
- How can I parse a YAML file in Python
- STDERR? What is it? What are its common uses?
- Cannot find module cv2 when using OpenCV
- Maximum and Minimum values for ints
- How is Anaconda related to Python?
- Handling file renames in Git
- What is the python keyword “with” used for? [duplicate]
- What is the purpose of meshgrid in Python / NumPy?
- Why are there two ways to unstage a file in Git?
- How to add to the PYTHONPATH in Windows, so it finds my modules/packages?
- FileNotFoundError: [WinError 2] The system cannot find the file specified:
- How to print to stderr in Python?
- SyntaxError: non-default argument follows default argument
- socket.error: [Errno 48] Address already in use
- Creating a basic auto clicker in python
- What’s the difference between torch.stack() and torch.cat() functions?
- How to print to stderr in Python?
- How to disable Python warnings?
- LinAlgError: Last 2 dimensions of the array must be square
- How to get data from SNMP with python?
- What does axis in pandas mean?
- What do >> and << mean in Python?
- List attributes of an object [duplicate]
- How can I set the aspect ratio in matplotlib?
- In Python how should I test if a variable is None, True or False
- Operand type clash: int is incompatible with date + The INSERT statement conflicted with the FOREIGN KEY constraint
- Pythonic way to iterate through a range starting at 1
- Convert from CSV to array in Python
- print variable and a string in python
- can’t remove python pip
- AttributeError: ‘list’ object has no attribute ‘replace’ when trying to remove character
- org.hibernate.HibernateException: Access to DialectResolutionInfo cannot be null when ‘hibernate.dialect’ not set
- How do I maximize the display screen in PyGame?
- Why does PyQt crashes without information? (exit code 0xC0000409)
- Matplotlib: TypeError: can’t multiply sequence by non-int of type ‘numpy.float64’
- NameError: global name ‘unicode’ is not defined – in Python 3
- Create nice column output in python
- Missing files, DirectX SDK (d3dx9.lib, d3dx9.h)
- TypeError: unsupported operand type(s) for +=: ‘int’ and ‘list’
- TypeError: int() argument must be a string, a bytes-like object or a number, not ‘list’
- how to center form using bootstrap 4
- How to implement OnFragmentInteractionListener
- How do I select text nodes with jQuery?
- Missing sudo password in Ansible
- TemplateDoesNotExist at /
- How do I update a Python package?
- Python 3 print without parenthesis
- What is stdole2.tlb
- Generate a random letter in Python
- NameError from Python input() function
- How do I tell Matplotlib to create a second (new) plot, then later plot on the old one?
- Python-like list comprehension in Java
- In the following SAS statement, what do the parameters “noobs” and “label” stand for?
- AttributeError: ‘Series’ object has no attribute ‘split’ error in sending emails
- Uploaded successfully to Heroku Local but getting 503 error once pushed to Heroku live
- Source Tree doesn’t launch after installation
- Search database with WPDB using a php variable
- Using Javascript to Set Redirect Page in Contact Form 7
- Change css for certain user roles
- Block any other domains from using my server