4

I am using pyjamas to develop a web page. I write python code which is translated to javascript by pyjamas. This way debugging programming error is caught only when testing the web page. It would be much more efficient if we can run the code first in the Python interpreter before compiling to javascript. This seems would require pyjamas-desktop be installed. I tried installing pyjamas-desktop but it was not straight forward for me and I could not succeed in installing pyjamas-desktop.

I am wondering if there is anyway to run the code to just check for errors i.e. I do not want to see the widgets popped up. But just running in the interpreter so that errors like missing to import a module that is used in the program are caught.

Suresh
  • 691
  • 5
  • 17

1 Answers1

4

Pylint is probably the first place to start - it can be installed with easy_install then run as

$ pylint my_python.py

The verbosity of errors can be easily edited - but any major problems will be highlighted immediately - and you don't need those extra pyjamas-desktop modules installed! Other similar tools (that do the same sort of thing) are PyCheckMate (syntax check only), PyChecker, and PyFlakes.

danodonovan
  • 17,150
  • 6
  • 64
  • 73