Programming, electronics, lifestyle

22 Apr 2020

Python: Cheatsheet

Everytime when I am doing a something by Python (or by something else) I need to use articles about main libraries. Despite that I’ve seen it a lot of times, it just can’t fit in my head. So I wrote this article to get the information quickly.

Basically it consist links to russian resources.

Serial monitor on Python

import serial
port = serial.Serial("/dev/ttyAMA0", baudrate=57600, timeout=3.0)
port.readall()

Virtual ENV

Source: https://python-scripts.com/virtualenv

python3 -m venv env
# it will create `env` dir
source env/bin/activate

To deactivate use:

deactivate

Python packages

Maybe however I will write own copies of these scratches.
This article will be updated when it needs.