Changeset 397
- Timestamp:
- Fri Dec 21 12:56:21 2007
- Files:
-
- trunk/support/rthooks/opengl.py (modified) (diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
trunk/support/rthooks/opengl.py
r218 r397 34 34 35 35 def myopen(fn, *args): 36 import os 37 lastdir = os.path.basename(os.path.dirname(fn)) 38 if os.path.basename(fn) == "version" and os.path.splitext(lastdir)[1] == ".pyz": 39 import cStringIO 36 if fn.endswith("version") and ".pyz" in fn: 40 37 # Restore original open, since we're almost done 41 38 __builtins__.__dict__["open"] = __realopen__ … … 43 40 # used by the library, but it needs to be made of four numbers 44 41 # separated by dots. 42 import cStringIO 45 43 return cStringIO.StringIO("0.0.0.0") 46 44 return __realopen__(fn, *args)
