home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / C / Applications / Python 1.3 / source code / Demo / sgi / gl / glstdwin / stdwingl.py < prev    next >
Encoding:
Text File  |  1995-12-17  |  353 b   |  11 lines  |  [TEXT/R*ch]

  1. # If you put 'import stdwin_gl' in front of the main program of a program
  2. # using stdwin (before it has a chance to import the real stdwin!),
  3. # it will use glstdwin and think it is stdwin.
  4.  
  5. import sys
  6. if sys.modules.has_key('stdwin'):
  7.     raise RuntimeError, 'too late -- stdwin has already been imported'
  8.  
  9. import glstdwin
  10. sys.modules['stdwin'] = glstdwin
  11.