<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal;
        font-family:Arial;
        color:navy;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>

</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>However, that said, in Beta 9, the
OldClass is no longer a DynamicType, which explains the exception itself. To
find out what you need to change in your code is something that we&#8217;ll need more
info for.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>For example, the exception can come from
anywhere in the Module body (during import, the module body gets executed &#8211;
unless the module has been already imported). Since I don&#8217;t get exception when executing
&#8220;from Module import Class&#8221;, I suspect that this is what may be the case. The
call stack for the exception could help find out what line in your module code
is throwing.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>M.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<div>

<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>

<hr size=2 width="100%" align=center tabindex=-1>

</span></font></div>

<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>
users-bounces@lists.ironpython.com [mailto:users-bounces@lists.ironpython.com] <b><span
style='font-weight:bold'>On Behalf Of </span></b>Martin Maly<br>
<b><span style='font-weight:bold'>Sent:</span></b> Thursday, July 13, 2006 8:09
AM<br>
<b><span style='font-weight:bold'>To:</span></b> Discussion of IronPython<br>
<b><span style='font-weight:bold'>Subject:</span></b> Re: [IronPython] Unable
to cast object of type 'IronPython.Runtime.Types.OldClass' to type
'IronPython.Runtime.Types.DynamicType'</span></font><o:p></o:p></p>

</div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>To help you, we will need more information
about your use of the Python Engine. The simple case of executing &#8220;from Module
import Class&#8221; does work so we need to know more to find out what the problem
may be.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Thanks<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Martin<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<div>

<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>

<hr size=2 width="100%" align=center tabindex=-1>

</span></font></div>

<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>
users-bounces@lists.ironpython.com [mailto:users-bounces@lists.ironpython.com] <b><span
style='font-weight:bold'>On Behalf Of </span></b>Mike Raath<br>
<b><span style='font-weight:bold'>Sent:</span></b> Thursday, July 13, 2006 1:41
AM<br>
<b><span style='font-weight:bold'>To:</span></b> Discussion of IronPython<br>
<b><span style='font-weight:bold'>Subject:</span></b> [IronPython] Unable to
cast object of type 'IronPython.Runtime.Types.OldClass' to type
'IronPython.Runtime.Types.DynamicType'</span></font><o:p></o:p></p>

</div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>Hi<br>
<br>
Having tried to switch over to beta 9, and changing my generic
Evaluate&lt;T&gt; references to EvaluateAs&lt;T&gt;, I get a runtime error on
an import statement which works under beta 8. The exception is as is detailed
in the message above, and is from a statement like <br>
engine.Execute(&quot;from Module import Class);<br>
<br>
The Module and Class definitions are custom - and as i say this statement works
under beta 8.<br>
<br>
Do you require more information or do I need to make a further change to my
code to get it to work? <br>
<br>
Thanks,<br>
Mike<o:p></o:p></span></font></p>

</div>

</body>

</html>