--
Ben Sizer
You can redirect python output to a file from the Windows command line. The
only caveat is for *some* command processors (NT in particular, IIRC) output
redirection only works if you explicitly call the python interpreter (i.e.
use the command "python prog.py > file.out") rather than implicitly call it
(i.e. use the command "prog.py > file.out").
regards
--
Steve Holden http://www.holdenweb.com/
Python Web Programming http://pydish.holdenweb.com/pwp/
"I'd spoll my own name wring if I didn't have a spilling chocker"
Alternatively, if you're running under an NT derivative, use the .cmd
command interpreter rather than the .bat command interpreter. Then
you get that nice scroll bar so you can see what scrolled off. Works
great on XP at least.
John Roth
> You can redirect python output to a file from the Windows command line. The
> only caveat is for *some* command processors (NT in particular, IIRC) output
> redirection only works if you explicitly call the python interpreter (i.e.
> use the command "python prog.py > file.out") rather than implicitly call it
> (i.e. use the command "prog.py > file.out").
Sadly, the way to use Pychecker on Windows involves indirect usage;
you call it via a batch file on the command line. Redirecting that -
at least on Win98 SE - doesn't work, instead creating an empty file
and sending all output to stdout as normal.
--
Ben Sizer
Easy enough to solve. Either type the same commands as the .bat file
contains directly on the command line, redirecting the output, or change
the .bat file (or make your own) which always redirects output to a
predetermined file, then just view the file after PyChecker runs.
-Peter
I don't know what kind of problem pychecker causes with IDLE but I
have managed to plug it into Pythonwin. There should be a similar way
to make it work with IDLE. You can find the thread here:
-- Henrik
It seems to work for me in IDLE (well enough for my purposes, anyway).
>>> import pychecker.checker
C:\Python23\lib\site-packages\pychecker\checker.py:569: DeprecationWarning:
the regex module is deprecated; please use the re module
m = imp.init_builtin(moduleName)
C:\Python23\lib\site-packages\pychecker\checker.py:569: DeprecationWarning:
the rotor module uses an insecure algorithm and is deprecated
m = imp.init_builtin(moduleName)
>>> import table
C:\Python23\lib\site-packages\Numeric\Precision.py:10: Imported module
(string) not used
C:\Python23\lib\site-packages\Numeric\Precision.py:17: Local variable
(typecodes) shadows global defined on line 13
...
# loads of stuff relating to modules imported by table
# then the stuff I'm interested in
...
C:\Python23\table.py:324: (vars) shadows builtin
C:\Python23\table.py:342: (vars) shadows builtin
>>>
Duncan
Yeah. I see what the issue is now - after Pychecker.checker is
imported, import statements work fine, but nothing else does at all.
So I just have to make sure that I set up the sys.path before I import
Pychecker, so that I am able to import my files. (Is there another
way?)
--
Ben Sizer
I don't know. I don't use it very frequently. Is there any reason you
can't fire up a couple of instances of IDLE and use one for 'pychecking' and
do the rest of your stuff in another?
Duncan
PyChecker is integrated in SPE, an python IDE built on wxWindows.
Maybe you coud try that.
http://spe.pycs.net
Good luck,
Stani
I use PyChecker with great joy together with scite.
Scite is a free editor based on scintilla.
I put PyChecker on Ctrl+3, so I only press Ctrl+3, PyChecker runs from a
batch on the currently edited file, all the output is put in a window
beside my prgramfile. With double clicking on errors & warnings scite skips
to that line.
VERY helpfull
Harald