Re: Preventing execution of a method

2008-12-12 Thread boyombo
On Dec 12, 9:09 am, Bruno Desthuilliers wrote: > Emanuele D'Arrigo a écrit : > > > On Dec 11, 7:48 pm, Bruno Desthuilliers > > wrote: > >>> or to provide read-only > >>> access. I.e. right now I'm working on the graphical client which > >>> potentially could be rewritten entirely by the users. It

Re: Preventing execution of a method

2008-12-12 Thread Bruno Desthuilliers
Emanuele D'Arrigo a écrit : On Dec 11, 7:48 pm, Bruno Desthuilliers wrote: or to provide read-only access. I.e. right now I'm working on the graphical client which potentially could be rewritten entirely by the users. It is necessary and perfectly reasonable for the client module to access some

Re: Preventing execution of a method

2008-12-11 Thread Emanuele D'Arrigo
On Dec 11, 11:46 pm, greg wrote: > Emanuele D'Arrigo wrote: > > -IF- the application was single-user yes, it wouldn't be a big deal. > > But as it is potentially multi-user, I don't want one party to corrupt > > the application for everybody else. > > In that case you definitely want a client-serv

Re: Preventing execution of a method

2008-12-11 Thread greg
Emanuele D'Arrigo wrote: -IF- the application was single-user yes, it wouldn't be a big deal. But as it is potentially multi-user, I don't want one party to corrupt the application for everybody else. In that case you definitely want a client-server architecture, with the server managing all t

Re: Preventing execution of a method

2008-12-11 Thread rdmurray
On Thu, 11 Dec 2008 at 13:41, Emanuele D'Arrigo wrote: On Dec 11, 7:48?pm, Bruno Desthuilliers wrote: or to provide read-only access. I.e. right now I'm working on the graphical client which potentially could be rewritten entirely by the users. It is necessary and perfectly reasonable for the c

Re: Preventing execution of a method

2008-12-11 Thread Emanuele D'Arrigo
On Dec 11, 7:48 pm, Bruno Desthuilliers wrote: > > or to provide read-only > > access. I.e. right now I'm working on the graphical client which > > potentially could be rewritten entirely by the users. It is necessary > > and perfectly reasonable for the client module to access some of the > > obj

Re: Preventing execution of a method

2008-12-11 Thread Bruno Desthuilliers
Emanuele D'Arrigo a écrit : Thank you all for the confirmation and the suggestions (including the tangential ones: I didn't know one could remove your his own posts!). As much as I really like Python (which I've been using full-time only for the past two months) I really wish it did have regular

Re: Preventing execution of a method

2008-12-11 Thread Bruno Desthuilliers
Emanuele D'Arrigo a écrit : Sorry if I'm a bit thick here... can any of the esteemed participant in this noble newsgroup Ain't that a bit over the border ?-) confirm that is not possible to prevent a python module's code from executing the methods of another module? I.e. if I have a class w

Re: Preventing execution of a method

2008-12-11 Thread Emanuele D'Arrigo
Thank you all for the confirmation and the suggestions (including the tangential ones: I didn't know one could remove your his own posts!). As much as I really like Python (which I've been using full-time only for the past two months) I really wish it did have regular private/ protected/public met

Re: Preventing execution of a method

2008-12-11 Thread r
> And of course -now- I realise that the OP was asking for protecting > methods. Please disregard my last post :) Alex23, Are you telling me that you do not know how to YANK your own post? I find that hard to believe. ;) -- http://mail.python.org/mailman/listinfo/python-list

Re: Preventing execution of a method

2008-12-11 Thread alex23
On Dec 12, 3:22 am, alex23 <[EMAIL PROTECTED]> wrote: > On Dec 12, 2:35 am, [EMAIL PROTECTED] wrote: > > > There is, however, also the possibility of prefixing the method name > > with '__'.  The invokes 'name mangling', which makes it more difficult > > (though not impossible, the idea is to avoid

Re: Preventing execution of a method

2008-12-11 Thread alex23
On Dec 12, 2:35 am, [EMAIL PROTECTED] wrote: > There is, however, also the possibility of prefixing the method name > with '__'.  The invokes 'name mangling', which makes it more difficult > (though not impossible, the idea is to avoid accidents) for the method > to be called from outside the class

Re: Preventing execution of a method

2008-12-11 Thread MRAB
alex23 wrote: On Dec 12, 2:07 am, "Emanuele D'Arrigo" <[EMAIL PROTECTED]> wrote: I.e. if I have a class with two methods, doSomethingSafe() and doSomethingDangerous(), is there a way to prevent another module from executing doSomethingDangerous() but allow the execution of doSomethingSafe()? My

Re: Preventing execution of a method

2008-12-11 Thread rdmurray
On Thu, 11 Dec 2008 at 08:16, alex23 wrote: On Dec 12, 2:07?am, "Emanuele D'Arrigo" <[EMAIL PROTECTED]> wrote: I.e. if I have a class with two methods, doSomethingSafe() and doSomethingDangerous(), is there a way to prevent another module from executing doSomethingDangerous() but allow the execu

Re: Preventing execution of a method

2008-12-11 Thread alex23
On Dec 12, 2:07 am, "Emanuele D'Arrigo" <[EMAIL PROTECTED]> wrote: > I.e. if I have a class with two methods, doSomethingSafe() and > doSomethingDangerous(), is there a way to prevent another module from > executing doSomethingDangerous() but allow the execution of > doSomethingSafe()? > > My under