Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python check is os is windows

from sys import platform
if platform == "linux" or platform == "linux2":
    # linux
elif platform == "darwin":
    # OS X
elif platform == "win32":
    # Windows...
Comment

python check operating system

from sys import platform
if platform == "linux" or platform == "linux2":
    # linux
elif platform == "darwin":
    # OS X
elif platform == "win32":
    # Windows...
Comment

check os python

>>> import platform
>>> platform.system()
'Windows'
>>> platform.release()
'XP'
>>> platform.version()
'5.1.2600'
Comment

PREVIOUS NEXT
Code Example
Python :: create requirements.txt conda 
Python :: python clear console 
Python :: rename columns in python 
Python :: pandas change column to a string 
Python :: mypy ignore line 
Python :: how to convert data type of a column in pandas 
Python :: python read json 
Python :: download pip install 
Python :: pandas df where row has na 
Python :: how to add legend to python plot 
Python :: Cannot mask with non-boolean array containing NA / NaN values 
Python :: python urlencode 
Python :: streamlit pip 
Python :: local image embed discord py 
Python :: pandas calculate iqr 
Python :: delete rows based on condition python 
Python :: unix to date python 
Python :: get diroctary in python 
Python :: python delete saved image 
Python :: plot to image python 
Python :: how to right click in pyautogui 
Python :: pyspark date to week number 
Python :: download pdf from url python 
Python :: python windows hide files 
Python :: how to select all but last columns in python 
Python :: read google sheet from web to pandas python 
Python :: how to make my jupyter prin full array 
Python :: absolute value columns pandas 
Python :: how to import csv in pandas 
Python :: selenium python enter text 
ADD CONTENT
Topic
Content
Source link
Name
5+8 =