473,385 Members | 1,838 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Find more than one error at once

Is it possible to coax python to find more than one error at once?

Thanks,
Joseph
Jun 27 '08 #1
5 762
On Sat, May 10, 2008 at 8:38 AM, Joseph Turian <tu****@gmail.comwrote:
Is it possible to coax python to find more than one error at once?

Thanks,
Joseph
--
http://mail.python.org/mailman/listinfo/python-list
Sounds like you want to catch and log exceptions.
Jun 27 '08 #2
Joseph Turian <tu****@gmail.comwrites:
Is it possible to coax python to find more than one error at once?
Definitely, write unit tests and run the whole suite
<URL:http://www.python.org/doc/lib/module-unittest>. All errors found
by your unit test suite will be reported.

If you mean the Python parser and compiler, then the answer to this is
in the Zen of Python: "In the face of ambiguity, refuse the temptation
to guess". An error in parsing or compiling leaves no clear
unambiguous path for finding further parsing or compilation errors.

--
\ "It's a good thing we have gravity or else when birds died |
`\ they'd just stay right up there. Hunters would be all |
_o__) confused." -- Steven Wright |
Ben Finney
Jun 27 '08 #3
Joseph Turian schrieb:
Is it possible to coax python to find more than one error at once?
What kind of errors? Syntax-errors? Then use one of the python source
code analyzers, such as pylint or pychecker.

Diez
Jun 27 '08 #4
On May 10, 8:13 am, "Diez B. Roggisch" <de...@nospam.web.dewrote:
What kind of errors? Syntax-errors? Then use one of the python source
code analyzers, such as pylint or pychecker.
Great!
Jun 27 '08 #5
Diez B. Roggisch wrote:
Joseph Turian schrieb:
>Is it possible to coax python to find more than one error at once?

What kind of errors? Syntax-errors? Then use one of the python source
code analyzers, such as pylint or pychecker.
I don't know about pylint, but "PyChecker works in a combination of
ways. First, it imports each module. If there is an import error, the
module cannot be processed." -- so it fails on the first syntax error.
For example:

C:\junk>type syntaxerrors.py
if foo = bar:
pass
foo = "unterminated
123 = foo

C:\junk>python -m pychecker.checker syntaxerrors.py
Processing syntaxerrors...
SyntaxError: invalid syntax (syntaxerrors.py, line 1)
if foo = bar:
^

Warnings...

syntaxerrors:1: NOT PROCESSED UNABLE TO IMPORT

C:\junk>
Jun 27 '08 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Arpan De | last post by:
Suppose I have the following ASP code: <% Dim strName ..................... ..................... ..................... ..................... ..................... .....................
8
by: JIMMIE WHITAKER | last post by:
Can someone help on this: I am just learning, and I'm connecting to the the northwindcs.mdf tables / open file is northwindcs.adp. This is the sample installed using msde, which is supposed to be...
6
by: Markus Dehmann | last post by:
I have n sets of elements. I want to find elements that occur more than once in more than one set. Maybe the following example shows what I mean: S1 = {1,2,3,2,4} S2 = {2,2,4,5,4} S2 =...
108
by: Bryan Olson | last post by:
The Python slice type has one method 'indices', and reportedly: This method takes a single integer argument /length/ and computes information about the extended slice that the slice object would...
10
by: Andrei Ivanov | last post by:
Hello, it seems my postgresql data has somehow become corrupted (by a forced shutdown I think): psql template1 -U shadow Password: ERROR: nodeRead: did not find '}' at end of plan node...
9
by: Clinton Frankland | last post by:
Hi, On a Windows 2000 Server when attempting to use System.IO.Directory.CreateDirectory(string.concat(Server.MapPath(""), "\verify")) I receive a System.IO.DirectoryNotFoundException error:...
2
by: Aaron Smith | last post by:
Has anyone had their IDE do this before? I have 3 grids that are bound to related tables. They are each in their own tab page. Grid1 - DS.Table1.Table2 Grid2 - DS.Table1.Table2.Table3 Grid3 -...
1
by: Scott F K Hooper | last post by:
My ASP.NET 2.0 project has a GridView that I want to be able to edit and update records with. The GridView has been bound to an ObjectDataSource control that has the following Update method...
5
by: peter | last post by:
Hello all, I'm looking for an advice. Example (one block in ascii file): $------------------------ NAME='ALFA' CODE='x' $------------------------
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.