[Python.NET] Loss of import hook?

Brian Lloyd brian at zope.com
Fri Feb 11 21:04:52 CET 2005


MessageThis appears to be a bug - I can reproduce it in a stock Python 2.4
:( I'll have
to look and see if this is new to 2.4 or what.



Brian Lloyd        brian at zope.com
V.P. Engineering   540.361.1716
Zope Corporation   http://www.zope.com


  -----Original Message-----
  From: pythondotnet-bounces at python.org
[mailto:pythondotnet-bounces at python.org]On Behalf Of JONES, Michael, FM
Quantitative Research
  Sent: Tuesday, February 08, 2005 6:17 AM
  To: 'pythondotnet at python.org'
  Subject: [Python.NET] Loss of import hook?


  Hello,

  I've just unzipped Python.Net, and copied the two DLLs to my c:\Python24
ActivePython install directory, but if I first import CLR on it's own, then
python seems to lose its import hook?

  ActivePython 2.4 Build 243 (ActiveState Corp.) based on
  Python 2.4 (#60, Nov 30 2004, 09:34:21) [MSC v.1310 32 bit (Intel)] on
win32
  Type "help", "copyright", "credits" or "license" for more information.
  >>> import CLR
  >>> from CLR.System.Reflection import Assembly
  Traceback (most recent call last):
    File "<stdin>", line 1, in ?
  ImportError: __import__ not found
  >>>

  If on the other hand I don't import CLR to begin with then it takes two
attempts to import a module:

  ActivePython 2.4 Build 243 (ActiveState Corp.) based on
  Python 2.4 (#60, Nov 30 2004, 09:34:21) [MSC v.1310 32 bit (Intel)] on
win32
  Type "help", "copyright", "credits" or "license" for more information.
  >>> from CLR.System.Reflection import Assembly
  Traceback (most recent call last):
    File "<stdin>", line 1, in ?
  ImportError: No module named System.Reflection
  >>> from CLR.System.Reflection import Assembly
  >>>

  What am I doing wrong?

  Thanks,
  Michael



****************************************************************************
*******
  The Royal Bank of Scotland plc. Registered in Scotland No 90312.
Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB.
  Authorised and regulated by the Financial Services Authority

  This e-mail message is confidential and for use by the
  addressee only. If the message is received by anyone other
  than the addressee, please return the message to the sender
  by replying to it and then delete the message from your
  computer. Internet e-mails are not necessarily secure. The
  Royal Bank of Scotland plc does not accept responsibility for
  changes made to this message after it was sent.

  Whilst all reasonable care has been taken to avoid the
  transmission of viruses, it is the responsibility of the recipient to
  ensure that the onward transmission, opening or use of this
  message and any attachments will not adversely affect its
  systems or data. No responsibility is accepted by The Royal
  Bank of Scotland plc in this regard and the recipient should carry
  out such virus and other checks as it considers appropriate.
  Visit our websites at:
  http://www.rbs.co.uk/CBFM
  http://www.rbsmarkets.com

****************************************************************************
****
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/pythondotnet/attachments/20050211/6fc93233/attachment.html


More information about the PythonDotNet mailing list