[IronPython] wierd import problem
Dino Viehland
dinov at exchange.microsoft.com
Mon Apr 23 23:39:39 CEST 2007
Argh, no it wasn't... thanks for catching that. It looks like it's broken in v1.1 when I use it normally, that must have been what I did wrong before.. Ok, I'll have to look into this one deeper :).
From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Simon Dahlbacka
Sent: Monday, April 23, 2007 2:29 PM
To: Discussion of IronPython
Subject: Re: [IronPython] wierd import problem
On 4/24/07, Dino Viehland <dinov at exchange.microsoft.com<mailto:dinov at exchange.microsoft.com>> wrote:
Oh, it seems to be the presence of the '.dll' in the filename (although I still haven't looked too deeply to understand the exception). See below for the 3 different variations I've tried. The .NET loader will append .dll/.exe for you automatically.
F:\repro\foo\Foo\bin\Debug>dir
Volume in drive F is New Volume
Volume Serial Number is F62E-82C1
Directory of F:\repro\foo\Foo\bin\Debug
04/23/2007 01:45 PM <DIR> .
04/23/2007 01:45 PM <DIR> ..
04/23/2007 01:42 PM 4,096 Foo.Bar.dll
04/23/2007 01:42 PM 11,776 Foo.Bar.pdb
04/23/2007 01:42 PM 4,096 Foo.exe
04/23/2007 01:42 PM 11,776 Foo.pdb
04/10/2007 10:17 AM 71,016 ipy.exe
04/10/2007 10:17 AM 62,824 ipyw.exe
04/10/2007 10:17 AM 50,536 IronMath.dll
04/10/2007 10:17 AM 1,373,544 IronPython.dll
04/23/2007 01:45 PM <DIR> tmp
8 File(s) 1,589,664 bytes
3 Dir(s) 35,566,551,040 bytes free
F:\repro\foo\Foo\bin\Debug>.\ipy.exe
IronPython 1.1 (1.1) on .NET 2.0.50727.1318
Copyright (c) Microsoft Corporation. All rights reserved.
>>> import clr
>>> clr.AddReferenceToFile('Foo.bar.dll')
>>> import Foo.Bar
Traceback (most recent call last):
File , line 0, in <stdin>##14
File , line 0, in __import__##7
SystemError: F:\repro\foo\Foo\bin\Debug\Foo.exe is not pre-compiled module; try again after deleting it.
>>> ^Z
F:\repro\foo\Foo\bin\Debug>.\ipy.exe
IronPython 1.1 (1.1) on .NET 2.0.50727.1318
Copyright (c) Microsoft Corporation. All rights reserved.
>>> import clr
>>> clr.AddReference('Foo.bar.dll')
>>> import Foo.Bar
Traceback (most recent call last):
File , line 0, in <stdin>##14
File , line 0, in __import__##7
SystemError: F:\repro\foo\Foo\bin\Debug\Foo.exe is not pre-compiled module; try again after deleting it.
>>> ^Z
F:\repro\foo\Foo\bin\Debug>ipyd
IronPython console: IronPython 2.0 (2.0.0.0<http://2.0.0.0>) on .NET 2.0.50727.1318
Copyright (c) Microsoft Corporation. All rights reserved.
>>> import clr
>>> clr.AddReference('foo.bar')
>>> import Foo.Bar
>>> dir(Foo.Bar)
['Bar']
>>>
Was the switching to another executable intentional?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20070423/4eb8b156/attachment.html>
More information about the Ironpython-users
mailing list