[code.view]

[top] / python / PyMOTW / site / site_enable_user_site.py

     #!/usr/bin/env python
     # encoding: utf-8
     #
     # Copyright (c) 2010 Doug Hellmann.  All rights reserved.
     #
     """Check whether user site directory is enabled.
     """
     #end_pymotw_header
     
     import site
     
     status = {
         None:'Disabled for security',
         True:'Enabled',
         False:'Disabled by command-line option',
         }
     
     print 'Flag   :', site.ENABLE_USER_SITE
     print 'Meaning:', status[site.ENABLE_USER_SITE]
     

[top] / python / PyMOTW / site / site_enable_user_site.py

contact | logmethods.com