"key9" <ia*****@126.com> wrote in message
news:e3**********@news.yaako.com...
Hi All
I need a library which can afford "cisco" console or "juniper" console
style control.
(may be something like autocad's command windows)
On programming running . It can afford a "SHELL" like control internal .
You can type command you defined and execute the "handler".
Is such a library exist?
(after several month trying , I think may be I should give up write such
a lib and found one, It's not complex to write mechanism, but have out of
control- afford parsing keyword tree, string comparing , list help ,time
delay execute...., I spend too much time on it, for after all ,what I want
do is write a console based SMS sender ,not the lib it self)
I recommend Python for this. There are two basic ways to do it: 1) write a
shared library in C++ and run it under Python using Boost.Python (which is
what I do) or 2) write the main program in C++ and run Python from there.
The first technique, called "extending", sounds more like what you want. The
second technique, called "embedding", is what I would do to add scripting to
a C++ application.
Of course if you don't know Python you will have to learn some, but unlike
C++ it is very easy to learn. Boost.Python takes all the pain out of
connecting up the C++ and the Python console is intuitive and powerful. I'm
in the middle of a project using these tools right now and I couldn't be
happier with it. See
www.boost.org
Cy