Thuban more modular?
Russell Nelson
nelson at crynwr.com
Fri Apr 1 06:38:04 CEST 2005
Jonathan Coles writes:
> what are people's thoughts on moving some of what is now
> core-functionality into Extensions?
I think this is a good idea. Here's how I would implement it:
Separable Thuban functions get split out into their own Extension
module. This module would export a set of standard functions that let
Thuban know what menu entries to add, and it would also make
functionality available to other Extensions. The module is
executable, and if run stand-alone (outside of Thuban), takes
parameters on its command line, or (perhaps) prompts for them. So,
people can use Thuban Extensions three ways:
o From inside Thuban.
o From the command line.
o Inside a Python program of their own authoring.
So, for example, there would be a "postscript" module. It would allow
a Thuban UI user to save the current map as postscript. It would also
allow you to run it from the command line as "postscript.py
foobar.session foobar.ps". Or a Python coder could:
#!/usr/bin/python
from Thuban.Model.session import Session
from Thuban.Lib.postscript import Postscript
# this isn't correct, but it's just an example.
session = Session.read_session("foobar.session")
Postscript.write(session, "foobar.ps")
--
--My blog is at blog.russnelson.com | The laws of physics cannot
Crynwr sells support for free software | PGPok | be legislated. Neither can
521 Pleasant Valley Rd. | +1 315-323-1241 cell | the laws of countries.
Potsdam, NY 13676-3213 | +1 212-202-2318 VOIP |
More information about the Thuban-devel
mailing list
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)