LionHeart123 / pyscripter

Automatically exported from code.google.com/p/pyscripter
0 stars 0 forks source link

Add simple 'syntax check' feature #664

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I'm using Eclipse with pydev. That's really the best IDE for python I've used. 
But the big shortage is it's platform Eclipse is too heavyweight. So I moved to 
light weight pyscripter for little projects. 

One of the most useful feature of pydev is its in-time 'syntax checking'. 
For example, the following code missed a bracket:

if (2>1:
    print 1

after typing the above code, pydev will give us a error warning. That will save 
our time not to correct it after finding it during running.

Maybe someone will think user should be cautious not to make that happen. IDE 
is not necessarily to have that. I do not agree with that. User would have many 
typing errors during writing a relatively big script file. If they could be 
correct during writing, it would save a lot time. 

Original issue reported on code.google.com by jcyr...@gmail.com on 11 Jun 2012 at 3:15

GoogleCodeExporter commented 9 years ago
If you type the above code in pyscripter you will see the syntax error marked 
with a red line below the error, similar to what you get in word processors 
when you mistype a word.  The editor tab is also marked with a bug icon to 
indicate that the source file has syntax errors.

Original comment by pyscripter on 11 Jun 2012 at 11:24

GoogleCodeExporter commented 9 years ago
sorry, my example is not correct. it should be like the following.

if (2>1):
    print abc

'abc' is a variable not defined. Pyscriptor does not show error mark while 
pydev does.

Original comment by jcyr...@gmail.com on 21 Jun 2012 at 2:21

GoogleCodeExporter commented 9 years ago
This is not a syntax error.  The code is valid.  You can use the pylint tool in 
PyScripter to show such errors (Tools, Tools, Pylint), which requires that you 
install pylint.  

Such a check though does not happen automatically.

Original comment by pyscripter on 21 Jun 2012 at 7:40