Exposing object model in Python?
graham__fawcett at hotmail.com
Fri Jun 27 06:13:00 CEST 2003
"MK" <MK at foo.com> wrote in message news:<bdffi1$skho2$1 at ID-174077.news.dfncis.de>...
> Hi all,
> What would be the best way to expose the object model
> of a Python application?
There's no best way, and there are many very good ones to choose from.
I think the best-fit solution depends much on the specifics of your
problem. Perhaps you could clarify the nature of the application, the
environment in which you intend to deploy it, the intended audience
for the app, and some common use-cases in which you would wish to
write scripts against your model.
> If I package my app with py2exe, can I ship Python
> intepreter and access py2exe-cised app through Python
> scripts then?
The .exe created by py2exe *is* a Python interpreter. The tail-end of
the file is ZIP data containing the .pyc files of your application.
Practically speaking, the files in the tail-end are intended only for
the direct access of the interpreter in the head. So I don't think
py2exe is what you're looking for, unless you intend to run a
py2exe-based server of some kind which your scripts will connect to.
More information about the Python-list