Basic update script for Raspberry Pi (#32519)

Python update && upgrade script for Raspberry Pi
This commit is contained in:
Terho
2019-06-28 09:22:07 +03:00
committed by Randell Dawson
parent 0814e2b022
commit d86a007cec

View File

@ -2,6 +2,18 @@
title: Rasberry PI Basics
---
## Update your Raspberry Pi
With os.system(), it is possible to write shell commands and run the apt-get update and upgrade.
```
import os
def install_updates():
os.system('sudo apt-get update && sudo apt-get upgrade -y')
install_updates()
```
## Rasberry PI Basics Example
```python
## CODE THAT MAKES AN LED GLOW FOR 2 SECONDS