Logging _into_ an application

Irmen de Jong irmen at -NOSPAM-REMOVE-THIS-xs4all.nl
Mon Mar 17 16:35:30 EST 2003


Stefan Schwarzer wrote:
> I would like to know if there's a framework available for logging into a 
> Python
> application, in the same sense I can use a command line database client 
> to query
> a database (e. g. psql for PostgreSQL). Example for the Python case:
> 
> myhost$ start_application.py
> Running in background ...
> myhost$ application_admin.py
>  >>> import mycache
>  >>> mycache.cached_items_count()  # number of items in the 
> application's cache?
> 42
>  >>> import gc
>  >>> len(gc.garbage)  # how many objects weren't collected?
> 3
>  >>> ^D
> myhost$


It seems that you want to have a running application, and be able
to do things with it from within another application, while the
original application keeps on running at the same time.
A mechanism for this is usually called IPC - short for InterProcess
Communication. You have to create some sort of interface in
your application that allows it to be accessed "from the outside",
whatever that may be (you called it "loggin into an application").

It could also very well be that you just want to "look inside"
your running application. Debuggers are the tools for doing that.

--Irmen de Jong





More information about the Python-list mailing list