[Pythonmac-SIG] IDE Comments

Schollnick, Benjamin Benjamin.Schollnick@usa.xerox.com
Wed, 07 Aug 2002 12:52:32 -0400


> I now think that the whole PyFontify approach is flawed, and that it's not
> really suitable for live coloring. Either we need to copy what IDLE is
doing,
> or, and THAT would be a MAJORLY exciting enhancement of the IDE, is to
switch to
> Scintilla as the text component instead of waste. Then we get _folding_
for free
> as well! I usually don't like to shout in emails, but THIS WOULD BE
EXTREMELY
> COOL ;-) Scintilla is what PythonWin uses.

Folding would be extremely cool and usable....

One of the main reasons I haven't been using the mac IDE (instead I'm using
BBEDIT Lite), is that there is no syntax coloring.... But folding, even if
it wasn't colored, would certainly demand my consideration...

I'm not a C++ programmer either... But wanted to make sure it had my vote...

		- Benjamin

-----Original Message-----
From: Just van Rossum [mailto:just@letterror.com]
Sent: Wednesday, August 07, 2002 9:45 AM
To: Dan Grassi
Cc: pythonmac-sig@python.org
Subject: Re: [Pythonmac-SIG] Step-by-step howto for testing new
Mach{ho}Python architecture


Dan Grassi wrote:

> I suggest including the syntax coloring into the IDE.  Syntax coloring 
> is now expected and it can be disabled easily.  I would be willing to do 
> the work.

A bad implementation of syntax coloring has been hiding in the IDE for a
while:
edit line 679 to read

        self.do_fontify = 1

(Re)start the IDE and you're laughing.

It's bad in the sense that:

  1) It doesn't do the right thing when editing triple quoted strings
     (That's why there is a secret shortcut which recolors the entire
     document:cmd-shift-d.)
  2) It _sometimes_ traces back in PyFontify in some of the complex regexen
     (this is probably due to sre, but I never bothered to research the
     problem)
  3) It is slow becuase it does it's work as idle callbacks, which are
     scheduled fairly low-frequently by the event loop.
  4) Neither fonts nor colors are settable with a GUI.

I now think that the whole PyFontify approach is flawed, and that it's not
really suitable for live coloring. Either we need to copy what IDLE is
doing,
or, and THAT would be a MAJORLY exciting enhancement of the IDE, is to
switch to
Scintilla as the text component instead of waste. Then we get _folding_ for
free
as well! I usually don't like to shout in emails, but THIS WOULD BE
EXTREMELY
COOL ;-) Scintilla is what PythonWin uses.

Problem is: it needs to be ported to Carbon. Problem #2 for _me_ is: it's in
C++, which I can't write. Anyone, please check out http://www.scintilla.org/
if
you're interested in a project.

Just

_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig