Traceback disapears before I can read it!

John Ladasky ladasky at my-deja.com
Wed May 14 14:17:48 EDT 2003


Well, I figured out why SciTE wasn't working.  I had two separate
problems to fix.

I, ladasky at my-deja.com (John Ladasky) wrote in message news:<c09b237b.0305120555.5b361810 at posting.google.com>...
> Jordan Krushen <jordan at krushen.com> wrote in message news:<opro08t1aq5ctagx at shawnews>...
> > On 11 May 2003 13:53:23 -0700, John Ladasky <ladasky at my-deja.com> wrote:
> > 
> > > O.K., all of you professional snake charmers, how do you debug in a
> > > GUI environment?
> > 
> > I just code in SciTE: http://scintilla.org/SciTE.html
> > 
> > It has an output window which displays any tracebacks, and even hops to the 
> > appropriate section of code upon double-clicking.  Works great with 
> > wxPython.
> > 
> > J.
> 
> Grrr.  Yes, I almost forgot about Scintilla.  I downloaded SciTE a few
> weeks ago, and after failing to get everything out of it that was
> promised, its capabilities slipped my mind.
> 
> I actually write my Python code in SciTE, and I'll probably write HTML
> in it as well.  I like the way that SciTE has a rudimentary
> understanding of a language's syntax, keywords, and indent
> conventions.
> 
> Where am I stuck?  I haven't figured out how to connect the editor to
> the Python interpreter.  I found F8 which opens the output window
> Jordan mentioned, and F5 which will theoretically pass my program to
> the Python interpreter.  But when I try F5, the output window reads
> "The system cannot find the file specified."
> 
> Gosh, that was helpful.  I thought we had left the age of cryptic
> error messages behind.  What file did the system fail to find?  Where
> was it looking?
> 
> I'm guessing that I can fix this error by editing path names in the
> "SciTEGlobal.properties" and/or the "python.properties" files.  If
> only I could figure out where to look... the SciTE documentation
> hasn't helped me, thus far.  I would be most grateful if someone would
> share their knowledge here...

It turns out that "C:\Python22" was not in my PATH environment
variable.  I had assumed that, since the Windows registry had
associated *.py files with Python.exe, this would propagate over to
SciTE.  Not so.

After I had fixed the PATH, I had one more problem to correct.  I use
spaces in my file names.  I would guess that most modern computer
users do.  However, in DOS parlance, a space delimits the arguments. 
So if SciTE tried to run "My Program", it would return an error
indicating that it couldn't find the file "My.py".

Adding quotation marks around the SciTE FileNameExt token prevents the
DOS interpreter from parsing the spaces in the file name.  The
relevant lines in the SciTE python.properties files now read as
follows:

if PLAT_WIN
	command.go.*.py=pythonw -u "$(FileNameExt)"
	command.go.subsystem.*.py=1
	command.go.*.pyw=pythonw -u "$(FileNameExt)"
	command.go.subsystem.*.pyw=1
 
Hope this helps somebody else some day.

--
John J. Ladasky Jr., Ph.D.
Department of Biology
Johns Hopkins University
Baltimore MD 21218
USA
Earth




More information about the Python-list mailing list