about invalid syntax

adDoc's networker Phil dr.addn at gmail.com
Tue Nov 15 04:48:42 EST 2005


. I've been schooled with various versions of several languages,
but I'm just now learning python:
I've not yet personally experienced any python debugger .

. I understand the python`IDLE (integrated DeveL Envir)
comes with the std distro, and here is the part in the doc's
that you might find encouraging:

google( python idle debugger faq)
[@]
http://www.python.org/doc/faq/programming.html#is-there-a-source-code-level-debugger-with-breakpoints-single-stepping-etc
"(

General Questions
1.1.1 Is there a source code level debugger with breakpoints,
single-stepping, etc.? Yes.

The IDLE -- includes a graphical debugger.
(see folder path: Tools/scripts/idle),

There is documentation for the IDLE debugger
at http://www.python.org/idle/doc/idle2.html#Debugger

PythonWin
includes a GUI debugger
based on pdb (python`s std command-line debug)
. The Pythonwin debugger colors breakpoints
and has quite a few cool features such as debugging non-Pythonwin programs.
A reference can be found at http://www.python.org/windows/pythonwin/
. Recent versions of PythonWin are available as a part of
the
ActivePython distribution
(see http://www.activestate.com/Products/ActivePython/index.html).
)-python.org <http://python.org>

. another thing I plan to get into
since I'm interested in taming xp,
is
iPython, [@] http://ipython.scipy.org/

. there are many reasons for this,
but the one most relevant to your needs at the moment
(avoiding mysterious error msg's)
is this:
"(
# Automatic indentation of code as you type
-- (merely having inconsistent spaces or a tab-space mixture can cause
unexpected syntax msg's, I'm told)

# Verbose and colored exception traceback printouts
. Easier to parse visually, and in verbose mode they produce a lot of useful
debugging information

# Easy debugger access
to rapidly isolate the source of a bug:

. You can set IPython to call up the Python debugger (pdb) every time there
is an uncaught exception
. This drops you inside the code which triggered the exception
with all the data live and it is possible to navigate the stack
. The %run magic command -with the -d option-
can run any script under pdb's control,
automatically setting initial breakpoints for you.

[. other features that interest me include: ]

# Offers a flexible framework inspired by the likes of Mathematica, IDL and
Mathcad
# Session logging (you can then later use these logs as code in your
programs).
# Session restoring: logs can be replayed to restore a previous session to
the state where you left it.
# Filesystem navigation, via a magic %cd command,
along with a persistent bookmark system (using %bookmark)
for fast access to frequently visited directories.
# The ability to expand python variables when calling the system shell
. In a shell command, any python variable prefixed with $ is expanded
. A double $$ allows passing a literal $ to the shell (for access to shell
and environment variables like $PATH).
)-scipy.org <http://scipy.org>



On 11/14/05, Ben Bush <pythonnew at gmail.com> wrote:
>
>
>
> On 11/14/05, adDoc's networker Phil <dr.addn at gmail.com> wrote:
> >
> > . maybe you could separate your code into parts { python std,
> > pythonwin-specific},
> > and then use a debugger to know most of the problem sources?
> > (I'm not familiar with pythonwin, I assume it's a superset of python
> > std) .
> >
> >  On 11/14/05, Ben Bush < pythonnew at gmail.com > wrote:
> >
> > >  When I run scripts in PythonWin,
> > > sometimes will get the message of invalid syntax error.
> > > How can I check which error I made?
> > > For example, in VB, you might got the wrong place highlighted and help
> > > message too.
> > >
> > > --
> which IDE do you use to run Python?
> Thanks!
> Ben Bush
>



--
American Dream Documents
http://www.geocities.com/amerdreamdocs/home/
"(real opportunity starts with real documentation)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20051115/475591f2/attachment.html>


More information about the Python-list mailing list