[Python.NET] Loss of import hook?
JONES, Michael, FM Quantitative Research
michael.jonesw at rbos.com
Tue Feb 8 12:17:28 CET 2005
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/20050208/dae6a996/attachment.html
More information about the PythonDotNet
mailing list