durusmail: quixote-users: Debug syntax errors in PTL (was: A toy Nevow implementation)
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 (was: A toy Nevow implementation)
Oleg Broytmann
2004-01-15
On Thu, Jan 15, 2004 at 03:18:29PM -0600, Jason E. Sibre wrote:
> There is one flaw with PTL in my mind, and it relates to the way syntax
> errors (detected at compile time) are handled, which is, in my experience,
> not very well.  But this may be due to poor implementation on my end, or a
> quirk of the FastCGI mechanism (which I use)...  For example, improperly
> indented code, or mismatched parenthesis, misplaced colons, etc, can be hard
> to track down, because it never tells me WHERE it's wrong, only that
> importing that module failed.  .py files don't exhibit the same problem.

   Search the mailing list. The first thing I did after signing in was
publishing a number of small python and shell scripts that I use to
overcome exactly this problem. There is a scripts that is automatically
called from vim when I save the file - the script compiles the file and
report syntactic errors. There is a script that I call in vim using
   :make %
- the script compiles the file, catch an error and report it to vim; vim
parses the error responce and put cursor to the reported position. All
scripts work with .py and .ptl files. Additional advatage - after
successfull compilation you have .pyc/.ptlc bytecode files that you can
install on the server along with your module.

   If you are interested I can pack these scripts and my .vimrc and send
it to you.

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


reply