<s>[INST] I am trying to write a program in Python to run on a Raspberry Pi to read the temperature of a DS18B20 sensor.

The first step is to enable the 1-wire interface on the Raspberry Pi, which requires running a command like this:

sudo modprobe w1-gpio

I can't find any way to run this command from within the Python script. I can open a terminal window from within Python, but that's not what I want. I am trying to automate the entire process.

How can I run a Linux command from within a Python script?[/INST]