T
Tuang
I'd like to create my own mini "IDE" for working with several
programming languages that provide interactive "toplevel" command line
interpreters, such as Python, Ruby, Lisp, Scheme, OCaml, etc. (For
those who haven't played with them, these languages -- unlike C, Java,
C#, or Perl -- are designed to let you carry on an interactive
conversation with them, so you can run each function in your app
independently and interactively from a command prompt.) Several of
these languages have sort of clunky, half-built, 3rd party GUI front
ends for their interpreters, but nothing that I like lets me work in
all of those languages.
I imagine I'll have a multipane C# "Form" containing a tabbed window
for source code, another window pane that is essentially a command
line terminal running the language interpreter that I can interact
with directly, and some buttons/menu items that issue commands to the
Lisp, Python, etc., interpreter: a GUI front end that works for a
variety of interpreters.
What I don't have any idea how to do is to create the terminal window
part and have it act as a command line for an interpreter, nor do I
know how to send the interpreter commands from both the terminal pane
and in response to GUI events (buttons, menus, etc.). Of course I may
need to customize it to some extent for each interpreter I want to
use, but some of it must be generic, too. After all, a "DOS window" is
a GUI app that can provide the I/O for all of these interpreters
without any customization of the DOS window. What I imagine is that
the commands I send are custom, but the way a GUI app works as a front
end to an interactive command line app is generic, and that's what I
don't know how to do.
Any advice, pointers, code snippets, etc. would be appreciated.
Thanks.
programming languages that provide interactive "toplevel" command line
interpreters, such as Python, Ruby, Lisp, Scheme, OCaml, etc. (For
those who haven't played with them, these languages -- unlike C, Java,
C#, or Perl -- are designed to let you carry on an interactive
conversation with them, so you can run each function in your app
independently and interactively from a command prompt.) Several of
these languages have sort of clunky, half-built, 3rd party GUI front
ends for their interpreters, but nothing that I like lets me work in
all of those languages.
I imagine I'll have a multipane C# "Form" containing a tabbed window
for source code, another window pane that is essentially a command
line terminal running the language interpreter that I can interact
with directly, and some buttons/menu items that issue commands to the
Lisp, Python, etc., interpreter: a GUI front end that works for a
variety of interpreters.
What I don't have any idea how to do is to create the terminal window
part and have it act as a command line for an interpreter, nor do I
know how to send the interpreter commands from both the terminal pane
and in response to GUI events (buttons, menus, etc.). Of course I may
need to customize it to some extent for each interpreter I want to
use, but some of it must be generic, too. After all, a "DOS window" is
a GUI app that can provide the I/O for all of these interpreters
without any customization of the DOS window. What I imagine is that
the commands I send are custom, but the way a GUI app works as a front
end to an interactive command line app is generic, and that's what I
don't know how to do.
Any advice, pointers, code snippets, etc. would be appreciated.
Thanks.