I\'ve tested code that requires root access in pyCharm
by running sudo pycharm.sh
but this is not the way I would recommend of doing so.
I
For what it's worth, I've managed run a python script with sudo priviledges (on Ubuntu 16.04) like this:
In the very first line in the script, define the interpreter like this:
#!/usr/bin/sudo python
Make the script executable:
chmod +x myscript.py
Run the script directly, without specifying the python
interpreter yourself:
./myscript.py