I employed Leo for an oddball use case, which it addressed beautifully. 

How long ago did this start, perhaps 2005? 

The job that I held then required that, without help from work 
infrastructure or from colleagues, I write tools for diagnosing and 
repairing problems with installations of a complicated software package and 
the many libraries it used. The package ran under Microsoft Windows, I had 
to ship the tools easily via e-mail, and they had to run easily, without 
requiring installation or uninstallation. 

In those less paranoid days, the flexible packaging method was a Windows 
Script Host file, in which Microsoft allowed scripts in the supported 
language of one's choice to call modules written in any other supported 
scripting language. Microsoft allowed the storage of multiple modules and 
data files in the WSH file; the format Microsoft employed for this was XML. 

The conventional approach would have been to use a commercial XML editor to 
build the file. XML editors were specialty products sold for huge sums to 
industrial combines. Commercial products were aimed at Big Enterprise 
Publishing with Big Enterprise Money, not at software development by a 
solitary programmer with a garden-variety PC and no budget. I needed to 
build my own editor, or I needed to write tools to pre-process each of my 
tools' source code and the source code for the library routines, then 
assemble the preprocessed code into the multiple WSFs. This would have been 
multiple tools, at least a preprocessor akin to the Unix "m4" command and 
an executable akin to Make, and those would need maintenance. I had no 
budget for buying software. What to use instead?  

Leo offered me a targeted IDE for Python with the ability to manage all my 
source code. It offered the PIM I needed to organize my development effort. 

I had to write scripts in Visual Basic Scripting Edition (VBS), because 
Microsoft deployed it everywhere, and because a lot of modules I could use 
were written in VBScript. With that in mind, I added support for VBScript 
to Leo's syntax highlighting. Leo's architecture made that easy. 

Each of the multiple tools that I would write would end up in a WSF of its 
own. Using Leo's @file commands for the individual WSFs would steer me to 
use a preprocessor-plus-compiler-plus-Make toolkit, so instead I reached 
for Leo's heritage in Literate Programming: I used Leo's now-deprecated 
@root command instead of the @file family of commands, and forced Leo to 
Tangle the section of the outline required to generate a required WSF. 

*That* allowed me to keep a straightforward correspondence between the 
section of the Leo file for each tool and the WSF for the tool itself: once 
I told Leo to Tangle the necessary section of its outline, I *knew* the 
resulting WSFs were correctly formatted and included exactly what I 
required, and nothing more. 

Because the the representation of a module within a WSF was XML, the source 
code for that module had to be encoded, or it had to be packaged specially 
so that the Windows Script Host software would handle it in its original 
form. I did not want to do the filtering, I wanted the outline to contain 
the unchanged file in a Leo node in a form that would guarantee its correct 
representation in the WSF. I was able to figure out how to surround the 
source code's node in the Leo outline in a few extra nodes that would allow 
me to use the source code exactly as it came. *That* made it painless for 
me to add new modules to to my library.  

In those days, Leo's GUI was built on the TKinter package that shipped with 
Python. That release of TKinter is not beautiful by any means, but its 
place as one of Python's Batteries Included meant that my entire 
development environment consisted of the installer for Python; the 
installer for the pywin32 extensions to Python; the installer for Leo; and 
the comparatively tiny LEO file that contained my tools' source code, the 
source code for the library routines, and all my notes. All that went on a 
single CD-RW, and I could install Python and pywin32 and Leo on a Windows 
computer in minutes and tweak my code as needed. 

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.

Reply via email to