ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> pyxpcom
pyxpcom
[pyxpcom] Python Scripting Component/PyXPCOM Interprocess Communication
by Ryan Sturmer other posts by this author
Jul 10 2007 1:10PM messages near this date
view in the new Beta List Site
Re: [pyxpcom] memory leak in PyIClassInfo.cpp | Re: [pyxpcom] Python Scripting Component/PyXPCOM InterprocessCommunication
I'm developing a XULRunner application that's got a python backbone, and
part of that backbone is ideally using python itself to expose scriptability
to the users.  I have a number of features on the "python side" of the world
that need to be scripted, but would also like access to my user interface
from the scripting language.

Imagine an MVC sort of design where I would like my view (all done in XUL
and web technologies) to be updated by my model and controller (python
backbone)  Essentially, I'd like to expose some of my user interface
functions (displayThis(), changeTheColorOfThat()) as methods of a "user
interface object" that's in the local namespace of the users scripting
environment.  I've written an nsIPyShell component that lets the user pass
commands and code blocks to a persistent python environment, but haven't
figured how to expose functions of the calling environment to that
namespace. (presumably via an XPCOM object of some variety)  I guess the
concept I'm shooting for is a "bidirectional" relationship, where an XPCOM
object can exist as a client and server at the same time (both the python
code and javascript code can share the same object)

I know this is a broad question... I'm not looking for a design solution,
but a point in the right direciton or a nod that this is even feasible... it
seems like an interprocess communication nightmare, and I wouldn't be
surprised by a response to the effect of "XPCOM/PyXPCOM doesn't do that."

Thoughts?

-R

-- 
"The preceding program contained violent scenes of a graphic nature.  Time
travelers with nervous dispositions may wish to listen to something else for
the past half hour."
-John Marsh
"The Hitchhikers Guide to the Galaxy"
Thread:
Ryan Sturmer
Mark Hammond
Ryan Sturmer
Mark Hammond
Ryan Sturmer
Mark Hammond
Ryan Sturmer
Mark Hammond
Ryan Sturmer

Privacy Policy | Email Opt-out | Feedback | Syndication
© 2004 ActiveState, a division of Sophos All rights reserved