[code.view]

[top] / python / PyMOTW / sys / sys_shelve_importer_missing.py

     #!/usr/bin/env python
     # encoding: utf-8
     #
     # Copyright (c) 2009 Doug Hellmann All rights reserved.
     #
     """
     """
     #end_pymotw_header
     
     import sys
     import sys_shelve_importer
     
     filename = '/tmp/pymotw_import_example.shelve'
     sys.path_hooks.append(sys_shelve_importer.ShelveFinder)
     sys.path.insert(0, filename)
     
     try:
         import package.module3
     except ImportError, e:
         print 'Failed to import:', e

[top] / python / PyMOTW / sys / sys_shelve_importer_missing.py

contact | logmethods.com