Update: KOBRA - .NET for Python

Chetan Gadgil cgjunkaddr at attbi.com
Sun Feb 2 17:22:49 EST 2003


New features:

1. Added capability to access statics more easily.
2. Cleaned up parameter handling of complex types (should work in most, if
not all cases) in the native module
3) Cleaned up Python module to allow uniform access to .NET methods and
fields and properties through the "dir" method

e.g.

Python 2.2.2 (#37, Oct 14 2002, 17:02:34) [MSC 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import kobralib
kobra - A Python Wrapper for .NET
Copyright (C) 2003 Chetan Gadgil (chetan at gadgil dot net)
All Rights Reserved
>>> kobralib.invokeStatic("System.Threading.Thread", "CurrentThread", [])
<kobralib.DotNetObject instance at 0x008B5C78>
>>> t1 = kobralib.invokeStatic("System.Threading.Thread", "CurrentThread",
[])
>>> dir(t1)
['.ctor', 'Abort', 'AllocateDataSlot', 'AllocateNamedDataSlot',
'ApartmentState', 'CurrentContext', 'CurrentCulture', 'CurrentPrincipal',
'CurrentThread', 'CurrentUICulture', 'Equals', 'FreeNamedDataSlot',
'GetData', 'GetDomain', 'GetDomainID', 'GetHashCode', 'GetNamedDataSlot',
'GetType', 'Interrupt', 'IsAlive', 'IsBackground', 'IsThreadPoolThread',
'Join', 'Name', 'Priority', 'ResetAbort', 'Resume', 'SetData', 'Sleep',
'SpinWait', 'Start', 'Suspend', 'ThreadState', 'ToString', '__doc__',
'__init__', '__module__', 'fillMyDict', 'get_ApartmentState',
'get_CurrentContext', 'get_CurrentCulture', 'get_CurrentPrincipal',
'get_CurrentThread', 'get_CurrentUICulture', 'get_IsAlive',
'get_IsBackground', 'get_IsThreadPoolThread', 'get_Name', 'get_Priority',
'get_ThreadState', 'kobraObj', 'set_ApartmentState', 'set_CurrentCulture',
'set_CurrentPrincipal', 'set_CurrentUICulture', 'set_IsBackground',
'set_Name', 'set_Priority']


I think that the module is VERY usable now.


http://www.gadgil.net/DotNetWrapperForPython.htm


DOWNLOAD:
http://www.gadgil.net/files/kobralib-1.6.win32.exe

Regards
Chetan Gadgil
cgjunkaddr at attbi.com






More information about the Python-list mailing list