You don't want that a user can run a particular script, just add this two lines at the beginning of your code.
1 2 3 4 5
import os, sys # if not root...kick out if not os.geteuid()==0: sys.exit("\nOnly root can run this script\n")
This recipe show how simple is to avoid any access from user to your scripts. You can add this lines at the beginning and the script won't start, but you can also put it in a particular class or function to deny only that part of the script. In addition remember to protect your file, owned by root and chmod 700.