[Ironpython-users] [PythonHidden] not working?

Pawel Jasinski pawel.jasinski at gmail.com
Wed Oct 8 22:31:42 CEST 2014


internal instead of public?
--pawel

On Mon, Oct 6, 2014 at 1:57 AM, rabidgremlin <rabidgremlin at gmail.com> wrote:
> 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
>
> _______________________________________________
> Ironpython-users mailing list
> Ironpython-users at python.org
> https://mail.python.org/mailman/listinfo/ironpython-users
>


More information about the Ironpython-users mailing list