Avoiding Python to be terminated by Red Key and Hiding the shell:
#Copyright (c) 2008 Pankaj Nathani
#imports the Envy module
import envy
#prints Envy version
print envy.version
print envy.is_app_system()
try:
envy.set_app_system(1)
except:
print 'exception !'
# Now python can't be terminated with the red key
print envy.is_app_system()
print 'now python can't be terminated by red key !'