On Wednesday, Dec 4, 2002, at 11:33 Europe/Amsterdam, Fredrik Lundh wrote: > what's wrong with: > > #4 > for path in sys.path: > if isinstance(path, types.StringTypes): > do_standard_import(...) > else: > path.do_import(...) > After reading Just's later message and the explanation about how Jython does it I think that my preference is now something like the "if hasattr(path, 'find_module')" fix. This will allow you to use a subtype of strings on sys.path. Make one pass over sys.path replacing the zipfiles and other funnies by a specialised subtype of string. -- - Jack Jansen <Jack.Jansen@oratrix.com> http://www.cwi.nl/~jack - - If I can't dance I don't want to be part of your revolution -- Emma Goldman -
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4