Configuration   Installation  Features   Author

Grapht Summary:

    Grapht was a data analysis tool at the start.  However, it has evolved into an interactive environment for developing in Perl.  The main element in Grapht is the text editor coupled with the "workspace".  The workspace is a window into the Perl symbol table.  All of the variables as well  as the subroutines are listed for each of the packages.  It dynamically keeps itself up to date as the user executes sections of code.

    Grapht also has a snipit library.  This library keeps short (what ever you consider short) chunks of code available to you with a few mouse clicks.  The snipits themselves can be in one of two states.  The first is printable.  When you double-click on this snipit, it will insert itself into the current text editor buffer.  The second type of snipit is executable.  When you double-click on this snipit, it executes with respect to the current package selected in the workspace.  You can change the snipit from printable to executable or back again just by checking a checkbox.

    Grapht is bundled with some packages that make plotting in perl (pTk) a snap.  In the demo.snip snipit library there are some examples of the plotting capabilities.

A Picture and a Thousand Words:

     Well this is what it looks like so far.  I am rapidly adding features, but I do want it to remain sparce.  I do not want to create a bloated monster like many of the annoying IDE's that are now being developed.  I want it simple.  And more importantly, I want it customizable.   It has to work in Windows as well as Linux/X.  The entire program is written in Perl with the graphics provided by pTk (The Perl Tk modules).

    Let me describe some of the areas of the picture above.  The menu is totaly customizable.  With a small working knowledge of Perl and Tk you can add virtualy anything to the menu.  Or remove things if that is what floats your boat.  If you don't have a working knowledge of Tk, Grapht might be a nice place to start developing those skills.  The index box indicates the current line and character number.  To go to another line simply type any valid Tk text index and hit enter.  The search box allows for regex searches of the current buffer.  Simply type in the value you are looking for (in this case "two") and hit return.  All of the matches will be highlighted with a blue background.  If you stay in the search box and hit the down or up arrow keys the current match will turn yellow, and the view will shift so that the text will be displayed.  If you keep hitting the up or down arrow, you will scroll through all the matches.  To unhighlight the text, delete all of the text in the search box and hit return.

    The white listbox with "scratch" displayed inside is the buffer list.  By clicking on a buffer in the list it will display that buffer.

    Below that lies the "workspace".  It allows the user to view all of the symbols perl has on its symbol table.  The combobox at the top allows the user to select what package variables to examine.  It also makes any code you execute use the package shown on the workspace as the default package.  This comes in handy if you have two identicle sets of data residing in two different packages.  You can run some analysis code on the first package's data then without changeing your code switch to the other package and do the same.

    If you drag variables from the workspace to the text area the variables will print themselves out in a form that allows Perl to eval them back into existence.  The workspace is dynamic and will update itself whenever there is a need to.

    The Text area is a Tk::TextUndo (However, that is easy to change if you have developed your own Tk text widget).  When you type data into the text area you can execute (I should say eval) this code in three ways.  You can eval an individual line by typeing ctrl-l after the line of code you want to run.  You can execute the entire buffer by typeing ctrl-p.  Or you can eval a selection by selecting some text and typeing ctrl-o.

    This is the Snipit library window.

    New - Create a new snipit
    Save - Saves all of the snipits in the current library
    Rename - Renames an individual snipit
    Delete - Deletes and individual snipit


     Many of the features of Grapht are loaded into Grapht at startup (or during execution, the dynamic nature of Perl is a wonderful thing).  The menus, most of the key bindings, colors for syntax highlighting, and whatever else you want to add is loaded in a process similar to a unix init system.  Files in a directory are numbered and will load in that order.  To get rid of a feature you don't want you can just rename that file by changeing the extension from .start to .anything_other_than_start .

    In the Configure directory you will find a Startup and a Menus directory.  Both of those directories contain numbered files.  Grapht will load all of the files in the menus directory with the extension .menu, and it will do it in sequencialy with respect to the number.  The startup directory is similar to the menu directory but only files with the extension .start will execute in numerical order.

    Grapht should be ready to run as soon as you download and extract the files.  There should be no configuration required.  But customize to your hearts content.


    What you need to run Grapht:

    Note: Grapht no longer needs XML::DOM.

    There is no real installation. The most difficult part is if you don't have Tk installed in your Perl distribution.  If not and you are having problems getting them, feel free to write to me or ask the question at the sourceforge help discussion group.

    I dislike programs that mess with your machines configuration.  So grapht does not do that.  Just download the zip file.  Create a directory.  Extract the zip file to that directory.  Then from that directory type "perl".  That is it.

    If you want to be able to run it from another directory.  It is simple and either involves using "use lib ....." or moving the graphtlib directory into one of your @INC paths.  I will add this section later.

Installation Summary:

  1. Ensure that Perl Tk is installed
  2. Download grapht zip file from sourceforge
  3. Create a directory called grapht.
  4. Extract files from the grapht zip file into new grapht directory
  5. Run grapht from that directory by typeing perl in a command prompt or in windows double click the icon.
Deletion Summary:
  1. Delete the directory you made under the installation instructions


    What is available now:

    What I want:

Demo Usage:
Go to snipits under the tools menu and try some.  There are not that many now that I have removed the requirement for XML.

Some default key bindings:

In the main grapht window:

In the snipit tool:


Erik R. Lechak