Re: [pyxpcom] FireFox Live Preview API
by Mark Hammond other posts by this author
Mar 29 2008 4:44PM messages near this date
view in the new Beta List Site
[pyxpcom] FireFox Live Preview API
|
[pyxpcom] PYXPCOM_LOG_FILE fix
> Â? I would like to implement using PyXPCOM a wrapper around FireFox,
> particularly the DOM with automated docstrings built from the Mozilla
> documentation. This would enable autocompletion and help() ,
> facilitating
> easy experimentation from IPython or your choice of shell/editor. This
> makes
> it much more likely for people to use it Â?in the heat of the momentÂ?.
>
> The API would contain convenience functions for recurring useage
> patterns so
> people could very quickly experiment in IPython and create test macros.
> Python wielding web developers everywhere would benefit as would
> Â?designersÂ?
> for whom Python is an approachable language.
>
> Some editors these days have inbuilt support for Live Preview of HTML
> as you
> type. This speeds up the creative process considerably. I have created
> a
> Live preview plugin for an windows editor using the win32py extensions,
> using COM to manipulate the DOM. I would very much like to create a
> cross
> platform solution that is easily callable from any editor with Python
> embedded.
I'm not sure what architecture you have in mind here - are you going to
embed the editor in a xpcom app, or embed a XUL app in the editor? Either
way, one or the other might "object" to working with the other one for
various reasons (ie, 2 GUI toolkits in 1 process is always going to be a
problem). You do understand that you can't currently use pure XPCOM as an
RPC mechanism between 2 processes, like you can with MSCOM?
> As of now here are some my thoughts (subject to evolution):
>
> Â Â Â First thing I will do is create the basic Wrapper Class of FireFox
> with
> PyXPCOM
> Â Â Â Next I will do the binding of all documented methods and
> properties,
> automating the process using HTML screen scraping (BeautifulSoup
> Library)
> ( The docstring documentation is the main part here, it seems
> most
> of the work is done)
> Â Â Â This will give me a great sandbox to experiment with creative
> solutions
> to the above
I don't understand what you are trying to achieve here. Just documentation
for the DOM expressed as Python docstrings?
> Is this sort of thing feasible with PyXPCOM?
I'm not quite sure what you are asking.
> Does PyXPCOM have something like the MakePY utility that win32 COM
> extensions do?
It has a tool (xpt.py) which can dump interface info, but it doesn't need a
generated file at runtime. In other words, pyxpcom doesn't need anything
like makepy.
> If so does it document the methods via docstrings? Does it document the
> DOM?
No - the interface definitions don't offer docstrings. Note that not all of
the DOM is implemented strictly using xpcom, but there are no docstrings at
runtime for the DOM either.
> Can you force Mozilla to do offscreen buffering?
I've no idea, but that isn't related to pyxpcom at all.
Mark
_______________________________________________
pyxpcom mailing list
pyxpcom@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Thread:
Nicholas Dudfield
Mark Hammond
|