i've always been curious why zope on windows with a bundled python seems to have problems with finding the standard lib exceptions. does anyone know why? for example from exceptions import SyntaxError class MySyntaxErr(SyntaxError): pass in a product generates an import error. (i last noted this behavior on 2.2, haven't used windows since...) thanks -kapil
Wild guess... theres a module /lib/python/Interface/Exceptions.py. In Python 1.5.2 doesnt that mean windows will import that rather than exceptions.py? Cheers. -- Andy McKay. ----- Original Message ----- From: "kapil thangavelu" <kthangavelu@earthlink.net> To: <zope-dev@zope.org> Sent: Friday, September 14, 2001 4:57 AM Subject: [Zope-dev] exceptions on windows
i've always been curious why zope on windows with a bundled python seems to have problems with finding the standard lib exceptions. does anyone know why?
for example
from exceptions import SyntaxError
class MySyntaxErr(SyntaxError): pass
in a product generates an import error.
(i last noted this behavior on 2.2, haven't used windows since...)
thanks
-kapil
_______________________________________________ Zope-Dev maillist - Zope-Dev@zope.org http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Andy McKay writes:
Wild guess... theres a module /lib/python/Interface/Exceptions.py. In Python 1.5.2 doesnt that mean windows will import that rather than exceptions.py? Only when you happen to be inside the "Interface" package... Anywhere else, it should find "exceptions".
However, I checked that in Python2.1 (at least) there is not "exceptions" module. "SyntaxError" (and friends) are defined in "__builtins__" and can be accessed directly. Dieter
However, I checked that in Python2.1 (at least) there is not "exceptions" module.
How strange, I've been doing a _lot_ of: from exceptions import Exception over the last week in Python 2.1.1 and it works fine for me :-S Confusedly, Chris
participants (4)
-
Andy McKay -
Chris Withers -
Dieter Maurer -
kapil thangavelu