[PYTHONMAC-SIG] Future stuff for the Alpha python mode

Tom Fetherston tomf59@sgi.net
Sun, 15 Dec 1996 20:50:19 -0500


 Hi all,

It is taking me a bit longer than I planned to get out another version of
the python mode for Alpha, so I thought I would tell you what I have planed
and get some feedback.

What has eaten up the most time is overhualing the template insertion
facilities that are avaliable in Alpha.  Included in the alpha distribution
is a set of files that support a template facility known as ElectricAlias.
This hasn't been touched since '92, and Alpha author has expressed surprise
that it still works given all the changes alpha has undergone since then.
There is a grad student at Havard that has written a lot of code for alpha,
much of which has eventually been incorporated into the distribution over
the years, who publishes a set of utilities know as "VincesAdditions".  It
includes a very nice set of utilities for creating templates, however, some
of the things he does make it hard to use with python.  I've been working
on a version that let's you change things so they are more conducive to
working in python.  This is just about done and could be released
separately (along with some python templates) if anyone is interested.

A number of people found the colorizing excessive and/or garrish in the
choice of colors.  If you have come up with your own set of colors that you
like, and/or you have turned off colorizing of certain groups of words,
please pass this back to me.  I'm working on making this more sanely
customizable.

I've written routines that parse the include and from...includ...
statements in such a way that option-clicking on the titlebar will produce
a pop-up of the module names.  Selecting one of these will open the
associated file.  You can also cmd-double click a module name and open its
file. (note: Alpha 6.5 has a bug in its pop-up routine, you might have to
uses a later beta version --usally pretty stable)

Two things on this, one - I had to make a copy of the search paths from the
pref app, do people modify this a lot?  Can I use an AE to get the current
settings.  Secondly, some of the modules do not seem to have veiwable
source code, (they exist as shared Libraries?)  I just  inform you that
these modules can't be viewed.  Are there other such modules in places
other than the Plug-ins folder?  Can you query python for the interface?
(hopefully with a AE so I could open a window with the interface).

A couple of people have asked about string colorizing, Alpha's string
colorizing is built in, delimited by double quotes and constrained to be on
a single line, so I don't think I can correct this, however, as I mentioned
in a recent reply;
>
>>
>>...The one thing
>>that would be nice to have (I don't know how easy it is to do this in
>>Alpha) would be to have strings colored properly. I looks like it only
>>handles double quote strings, and not single quotes or triple quotes.
>>When I use Emacs Python mode, I find that the syntax coloring of strings
>>is probably the most useful part of syntax coloring: you can see right
>>away when you've left off a terminating quote.
>>
>I have not figured out anyway to do this yet, the string hilighting that
>Alpha supports is built in and locked to double quotes occuring on a
>single line.  Perhaps I can come up with a string-delimiter balance
>function similar to the paren,brace,baracket balancer that momentarily
>hilites the opening delimiter when you type the close.

 Would that be Okay?

To support the commenting of programs, (creating and maintaing), I'am
considering the following sheme;

A module would be parsed for definitions and any existing comments.  A file
would be created with only these parts (i.e. definiton heads and existing
comments--no bodies).  These files would be given the module name and a new
extension (say .pyd), perhaps they would all end up in a "Doc" subfolder of
the parent module's folder.  This new file would be easy to naviagate and
add comments to.  Things like instant templates for presenting a table of
the arguments and explantion would be provided.

Using this scheme, long comments could be kept separate from the code.  You
would only have to merge them when you are distributing the modules.  Alpha
could support hypertext tags between the two.  There are a lot of ways to
go with this, any ideas?

Any feedback or other ideas welcome,

Tom Fetherston
Pittsburgh, PA USA



=================
PYTHONMAC-SIG  - SIG on Python for the Apple Macintosh

send messages to: pythonmac-sig@python.org
administrivia to: pythonmac-sig-request@python.org
=================