[Ironpython-users] [PythonHidden] not working?

rabidgremlin rabidgremlin at gmail.com
Mon Oct 6 01:57:55 CEST 2014


Hi there,

I'm using IronPython to add scripting to my app. I have some classes with
methods that I don't wish to expose to the IronPython scripting engine.

Doing some googling it looks like I should be able to add [PythonHidden] to
my class methods to achieve this, however it doesn't appear to work.

eg I have a Layer class with the following method

[PythonHidden]
public Canvas GetLayerCanvas()
{
   return layerCanvas;
}

In my Python script I am still able to call this method and a dir() command
on a Layer object results in:

['AddElement', 'Delete', 'GetElements', 'GetLayerCanvas', 'GetName',
'MoveBottom', 'MoveDown', 'MoveElementBottom', 'MoveElementDown',
'MoveElementTop', 'MoveElementUp', 'MoveTop', 'MoveUp', 'RemoveElement',
'SetName', '__class__', '__delattr__', '__doc__', '__format__',
'__getattribute__', '__hash__', '__init__', '__new__', '__reduce__',
'__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__',
'__subclasshook__']

Any ideas?

Thanks

Jonathan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20141006/b9d4f3b6/attachment.html>


More information about the Ironpython-users mailing list