Re: [pyxpcom] Python Scripting Component/PyXPCOMInterprocessCommunication
by Ryan Sturmer other posts by this author
Jul 10 2007 5:45PM messages near this date
view in the new Beta List Site
Re: [pyxpcom] Python Scripting Component/PyXPCOMInterprocessCommunication
|
Re: [pyxpcom] Python Scripting Component/PyXPCOMInterprocessCommunication
I guess the part that I'm missing is, that when I instantiate an xpcom
object X from javascript, that object represents an instance of executing
python code. If I instantiate an xpcom object Y from that python code, how
do I arrange it such that that object Y has access to variables in the
environment that instantiated X?
On 7/10/07, Mark Hammond <mhammond@[...].au> wrote:
>
> > Picture having an object within the pyshell environment called
> parentUserInterface
> > which has methods such as setIndicatorColor(), setIndicatorBlinkRate(),
> etc...
> > allowing my user (equipped with appropriate documentation regarding what
> parts
> > of the user interface are scriptable to write code like this
> >
> > def alert():
> > parentUI.setIndicatorColor(255,0,0)
> > parentUI.setIndicatorBlinkRate(10)
> > return
>
> > and call alert() from within his code, confident that it will in fact
> effect
> > the user interface in the way she specifies.
>
> parentUI can be any xpcom object at all. It could be implemented in
> JavaScript or Python (the former might be easier for interaction with the
> UI).
>
> > Does this make sense at all? I'm either horribly misusing the
> programming model,
> > or am missing something pretty basic.
>
> I'm almost certainly still missing something; I don't see why you think
> there would be a problem with this.
>
> Cheers,
>
> Mark
>
>
Thread:
Ryan Sturmer
Mark Hammond
Ryan Sturmer
Mark Hammond
Ryan Sturmer
Mark Hammond
Ryan Sturmer
Mark Hammond
Ryan Sturmer
|