[IronPython] Programming a package in c# (heirarchical modules)

Michael Foord fuzzyman at voidspace.org.uk
Mon Mar 8 18:10:23 CET 2010

Hey guys,

I'm probably missing the point - but why not just use .NET namespaces?

Or even (did someone suggest this) write the raw classes in C# and then 
compose them into the correct package heirarchy with a pure Python 
wrapper. This latter approach is probably the one I would take.


On 08/03/2010 17:05, Jeff Hardy wrote:
> Hi David,
> I looked into this some more, and I made some errors in my SO answer
> that I'll correct later (sorry!).
> When building PyCrypto, it builds&  installs .pyd files into the
> necessary folders; I assumed that it built one monolithic DLL (a
> strategy used by other modules), but it doesn't. When looking for
> Crypto.Hash.MD4, CPython will find and load Crypto\Hash\MD4.pyd. I had
> forgotten how .pyd files were used.
> I don't know if IronPython supports this technique; I've only used the
> monolithic DLL approach, so your current solution may be the correct
> one.
> - Jeff
> On Sun, Mar 7, 2010 at 10:22 AM, djlawler<djlawler at aol.com>  wrote:
>> I've been working on a port of PyCrypto to IronPython.  Are there any
>> pointers on how to properly program an external 'package' that has
>> heirarchical modules in it?  I know that this is easy in python.  I know
>> that I can create modules in c# for use in IronPython using the PythonModule
>> attribute, but these seem to be limited to __builtin__ modules, and also do
>> not seem to support nested or heirarchical modules (like Crypto.Hash.MD4).
>> Any comments or pointers would be welcome.  See
>> http://stackoverflow.com/questions/2365661/how-to-create-a-package-in-c-for-use-in-ironpython
>> for more information on what I'm asking.
>> Thanks,
>> David
>> --
>> View this message in context: http://old.nabble.com/Programming-a-package-in-c--%28heirarchical-modules%29-tp27809285p27809285.html
>> Sent from the IronPython mailing list archive at Nabble.com.
>> _______________________________________________
>> Users mailing list
>> Users at lists.ironpython.com
>> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
> _______________________________________________
> Users mailing list
> Users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


READ CAREFULLY. By accepting and reading this email you agree, on behalf of your employer, to release me from all obligations and waivers arising from any and all NON-NEGOTIATED agreements, licenses, terms-of-service, shrinkwrap, clickwrap, browsewrap, confidentiality, non-disclosure, non-compete and acceptable use policies (”BOGUS AGREEMENTS”) that I have entered into with your employer, its partners, licensors, agents and assigns, in perpetuity, without prejudice to my ongoing rights and privileges. You further represent that you have the authority to release me from any BOGUS AGREEMENTS on behalf of your employer.

More information about the Ironpython-users mailing list