<div dir="ltr">Are you exposing your hosting assembly to Python by calling ScriptRuntime.LoadAssembly? If so, you ought to be able to import your Entity class directly into Python and derive from it.<br><br><div class="gmail_quote">
On Wed, Sep 10, 2008 at 4:32 AM, Hannes Rahm <span dir="ltr">&lt;<a href="mailto:inflyttningshest@gmail.com">inflyttningshest@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div dir="ltr">Hello people!<br><br>I am developing a small multiplayer game in c# (using xna for graphics).<br>On the server side I am doing a lot of the logic programming in IronPython.<br><br>I have gotten to the point where I want to inherit from my &quot;Entity&quot; class defined in the hosting application source (c#) so I can specialize it for different purposes in IronPython.<br>

I do not know how to accomplish this. <br><br>I have temporarily solved this by having a python wrapper class around the c# object (which I have to create using a CreateEntity() function in one of the global objects I pass in from &quot;outside&quot;). Alternatively I can add a public object ScriptingObject; that I can fill with what I want from python. But both these solutions seem a tad bit inelegant.<br>

<br>Does anyone have any ideas on how to do this?<br><br>Best regards<br>/Hannes<br></div>
<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.ironpython.com">Users@lists.ironpython.com</a><br>
<a href="http://lists.ironpython.com/listinfo.cgi/users-ironpython.com" target="_blank">http://lists.ironpython.com/listinfo.cgi/users-ironpython.com</a><br>
<br></blockquote></div><br></div>