On 08/03/2010 17:34, Jeff Hardy wrote:
On Mon, Mar 8, 2010 at 10:10 AM, Michael Foord
<[email protected]> wrote:
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.
That's the basic idea, yes. The trick is doing it in a way that's
compatible with the existing PyCrypto Python code, since it's about
50/50 C/Python, and I assume that David only wants to do half the work
:). That said, I could be projecting my bias about how this should be
done onto David, so I'll let him make that decision.
If PyCrypto was pure C and had to be completely rewritten I would
recommend just using namespaces as well - but it's not, so what's the
best way to leverage the existing PyCrypto Python code while replacing
the C code with C#? PyCrypto uses .pyd files, but it looks like
IronPython doesn't support an equivalent.
Ah - I didn't realise that PyCrypto was partly implemented in Python. I
would still probably do it by implementing the necessary C# and then
modifying the Python code to add references to the assemblies. That way
the Python can be reused with only minor changes.
Michael
- Jeff
--
http://www.ironpythoninaction.com/
http://www.voidspace.org.uk/blog
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.
_______________________________________________
Users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com