[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Is comint the way to go?
From: |
Mathias Dahl |
Subject: |
Is comint the way to go? |
Date: |
Fri, 23 Feb 2007 20:40:18 +0100 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.92 (windows-nt) |
I want to write a command line interface to a program that isn't
command line driven. In fact, it is not even a program, it is a
database with a specific schema. What I want to do is create a
package that let's the user navigate this database using familiar
command line commands like `cd' and `ls'.
When the user does `cd', what happens in the background is that one
or more SQL-queries are sent to Oracle's Sql*Plus tool, and I massage
the response into something that fits nice on the command line.
It would look something like this:
myapp> cd Implementation
myapp> ls
packagefoo
packagebar
...
myapp> cd packagefoo
myapp> ls
file1
file2
None of the above is "real". Each command executed by the user
actually executes a specific query, depending on the context
(basically depending on where the user has previously "moved" using
`cd'), and the output will look like the output from working with a
file system.
My question is, is comint the right thing to use here? Or, must
comint derived packages always be built around a command line app? Am
I better off doing this more or less from scratch (I have working code
to make my queries, so that's not the issue, the issue is the user
interface)?
- Is comint the way to go?,
Mathias Dahl <=