On Aug 11, 3:17 am, James Stroud <[EMAIL PROTECTED]> wrote:
> You do realize your import statement will only be called for nt and dos
> systems don't you?
>

Yes. I would like to load a Windows Python Module (which is, say a
specific implementation for Windows only) in such a condition where I
find that the platform is Dos/NT.

Loading it globally doesn't make sense because when from the same
class an object is created on a non-windows platfom, it would be
waste. It would either ImportError or else just load the module and
never use it.

As per my understanding __init__ is executed only once during object
creation. For such situations (that I've explained above), I think
__init__() is the correct place to put imports.

Ritesh

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to