Basic update script for Raspberry Pi (#32519)
Python update && upgrade script for Raspberry Pi
This commit is contained in:
@ -2,6 +2,18 @@
|
|||||||
title: Rasberry PI Basics
|
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
|
## Rasberry PI Basics Example
|
||||||
```python
|
```python
|
||||||
## CODE THAT MAKES AN LED GLOW FOR 2 SECONDS
|
## CODE THAT MAKES AN LED GLOW FOR 2 SECONDS
|
||||||
|
Reference in New Issue
Block a user