Re: [IronPython] M2Cryto

2007-07-27 Thread Curt Hagenlocher
On 7/27/07, Garabatus Raptus <[EMAIL PROTECTED]> wrote:
>
>
> I would like to use M2Crypto (a wrapper for OpenSSL) with Ironpython.
> Any idea of how can I integrate it with Ironpython?


This is an extension to CPython written in C, which is therefore not
compatible with IronPython.  Depending on your application's requirements,
you may be able to use the SslStream class that's built into the .NET
Framework instead.

--
Curt Hagenlocher
[EMAIL PROTECTED]
___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


[IronPython] M2Cryto

2007-07-27 Thread Garabatus Raptus
Hi there,

I would like to use M2Crypto (a wrapper for OpenSSL) with Ironpython.
Any idea of how can I integrate it with Ironpython?

thanxs

gara
___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] System.Reflection.Assembly finding python modules but no classes..

2007-07-27 Thread Curt Hagenlocher
On 7/27/07, Matt Williams <[EMAIL PROTECTED]> wrote:
>
>
> This code is attempting to instantiate my IronPython classes dynamically
> from Microsoft.ApplicationBlocks.UIProcess.GenericFactory.
>
> It would appear that the factory is making calls to load the IronPython
> assembly, then using reflection to load/instantiate and return the
> specified class.


Unfortunately, this won't work because Python classes aren't CLR classes --
they can't be, because Python classes are mutable in ways that CLR classes
aren't.  To load a Python-implemented class via reflection, you'd have to
front-end it with a CLR class implemented in C#/VB/etc.

--
Curt Hagenlocher
[EMAIL PROTECTED]
___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


[IronPython] System.Reflection.Assembly finding python modules but no classes..

2007-07-27 Thread Matt Williams

I'm working on an IronPython project in Visual Studio.  I'm attempting 
to use some 3rd party code that's written using Microsoft Application 
Blocks.

This code is attempting to instantiate my IronPython classes dynamically 
from Microsoft.ApplicationBlocks.UIProcess.GenericFactory.

It would appear that the factory is making calls to load the IronPython 
assembly, then using reflection to load/instantiate and return the 
specified class.

This is causing a problem.  It would appear that the IronPython assembly 
does not have any knowledge of classes contained in the python modules.

I've narrowed the code down to the following:

The project is building an assembly called 'UIPython', and it contains a 
python module 'Form1' which itself contains a python class called 'Form1'

This code throws an exception:

System.Reflection.Assembly.Load("UIPython,Version=1.0.0.0,Culture=neutral,PublicKeyToken=null"
 
)
typeInstance = assemblyInstance.GetType('Form1.Form1', True, False)
--

"Could not load type 'Form1.Form1' from assembly 'UIPython, 
Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'."
--

However, attempting to load the module appears to be fine:

System.Reflection.Assembly.Load("UIPython,Version=1.0.0.0,Culture=neutral,PublicKeyToken=null"
 
)
typeInstance = assemblyInstance.GetType('Form1', True, False)
--

Interrogating the types in the assembly (assemblyInstance.GetTypes()) 
returns the modules, but none of the classes that are defined.

I'd be very grateful for any suggestions..


Regards,

Matt

___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com