Final answer:
To run code with different privileges, you can use the 'sudo' command in Linux or UNIX systems.
Step-by-step explanation:
In order to run part of your code with a set of privileges different from those of the context user, you can make use of sudo command in Linux or UNIX system.
The sudo command allows a user to run a command as another user, typically the superuser or root user.
For example, if you want to run a script with root privileges, you can use the following command:
sudo python script.py