On Wed, Sep 26, 2012 at 09:39:11PM +0200, Kolbjørn Stuestøl wrote:
> Tried all command options mentioned in the --help listing (not the
> -h listing).
> All returned something + "Aborted".
> The only one that not was aborted was python
> tools/validate_references.py --help
> I had to put the option *after* the command:
> python tools/validate_references.py -o
> Writing python -o tools/validate_references.py
> resulted in error message "Unknown option: -o"
Yes, '-o' is a script option, but '-v' is a valid Python option too.
> python -c 'import sys; sys.exit(0)'
> returned nothing.
> Is there any way to step through the Python script
You can try pdb (http://docs.python.org/library/pdb.html):
python -m pdb tools/validate_references.py ...
but that's overkill.
> or to get a log that register every step of the script?
There's a trace module (http://docs.python.org/library/trace.html),
but this would probably print much more information than you want.
> Or do I have to add some print's to the script to follow the steps?
This is the easiest way - or maybe it's even better to remove (or
disable) statements to find the problem.
Start with removing the two "sys.stdout.flush()" statements...
Jeder Staat beruht auf Macht, jede Macht auf Gewalt, und
Gewalt, sagt Einstein, zieht stets moralisch Minderwertige an.
-- Karlheinz Deschner
gimp-docs-list mailing list