durusmail: quixote-users: Debug syntax errors in PTL
A toy Nevow implementation
2004-01-15
2004-01-15
2004-01-15
2004-01-15
Debug syntax errors in PTL (was: A toy Nevow implementation)
2004-01-15
Debug syntax errors in PTL (was: A toy Nevowimplementation)
2004-01-15
Debug syntax errors in PTL (was: A toy Nevowimplementation)
2004-01-16
Jason E. Sibre (2 parts)
Debug syntax errors in PTL
2004-01-22
Debug syntax errors in PTL
2004-01-18
2004-01-18
2004-01-15
Re: A toy Nevow implementation
2004-01-16
2004-01-19
Re: A toy Nevow implementation
2004-01-19
Re: A toy Nevow implementation
2004-01-19
2004-01-19
2004-01-19
2004-01-19
2004-01-19
2004-01-19
2004-01-19
2004-01-19
2004-01-20
2004-01-20
2004-01-20
2004-01-20
2004-01-21
2004-01-20
Debug syntax errors in PTL
Oleg Broytmann
2004-01-18
On Sun, Jan 18, 2004 at 08:44:42PM +0000, Andy Todd wrote:
> (http://mail.mems-exchange.org/pipermail/quixote-users/2003-July/001684.html)
> but couldn't figure out what each of the files should be called or their
> exact purpose.
>
> Could you possibly elaborate for the benefit of us simpletons?

   You are welcome! Mailman (pipermail) do not show filenames of
attachments. Let me name and explain these things.

   The first script is called "compyle" (pun!). It accepts a list of files
on the command line, and compiles them to bytecode (both .pyc and .pyo.)

   The second script is "compyle-ptl", and it compiles a list of *.ptl
files.

   The third script is "compyle4vim.py", it is used in the vim
configuration (the last attachment). It compiles a file (python or PTL
module), catch syntax error, and report the error (if there was an error)
to stderr. vim will catch and parse the error response.

   The fourth and fifth scripts are "compyleall" and "compyleall-ptl". They
compile all python (or PTL) files in the current directory and all
subdirectories.

   The last attachment is a part of my .vimrc, related to Python. It sets
up vim to recognise *.ptl files as python files, sets python keywords as
vim "indent words", name compyle4vim.py (mentioned above) as the program to
run
   :make %
command on python files, sets error format to parse the output of
compyle4vim.py, and install the DoPython() as the function to be called
upon saving python (and PTL) files. The function calls compyle or
compyle-ptl scripts, remove bytecode files (python does not use bytecode
files if they are not named *.pyc/.pyo), and if the file is actually a
script (recognised by #! magic in the first line) - calls chmod to make the
file executable.

Oleg.
--
     Oleg Broytmann            http://phd.pp.ru/            phd@phd.pp.ru
           Programmers don't die, they just GOSUB without RETURN.


reply