#!/usr/bin/python
import os
import sys
sys.path.append('/usr/bin/python')
vs
os.environ['PYTHONPATH'] = '/usr/bin/python'
I am running a script as a cron job and want to set PYTHONPATH environ variable to '/usr/bin/python' for the script to be run. What is the correct way of of the two mentioned in the snippet above?