Pychecker under Windows

K

Kylotan

Is there a practical way to use Pychecker in Windows? It doesn't work
under IDLE. (In fact, it seems to end up breaking everything, and
every subsequent statement and expression I execute gets ignored.)
Running it from the Python interpreter in DOS means everything scrolls
off the screen. Ideally I'd like to redirect it to a file, or be able
to use it in IDLE.
 
S

Steve Holden

Kylotan said:
Is there a practical way to use Pychecker in Windows? It doesn't work
under IDLE. (In fact, it seems to end up breaking everything, and
every subsequent statement and expression I execute gets ignored.)
Running it from the Python interpreter in DOS means everything scrolls
off the screen. Ideally I'd like to redirect it to a file, or be able
to use it in IDLE.

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
 
J

John Roth

Steve Holden said:
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").

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
 
K

Kylotan

Steve Holden said:
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.
 
P

Peter Hansen

Kylotan said:
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.

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
 
H

Henrik Weber

Is there a practical way to use Pychecker in Windows? It doesn't work
under IDLE. (In fact, it seems to end up breaking everything, and
every subsequent statement and expression I execute gets ignored.)
Running it from the Python interpreter in DOS means everything scrolls
off the screen. Ideally I'd like to redirect it to a file, or be able
to use it in IDLE.

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:

http://groups.google.de/[email protected]

-- Henrik
 
D

Duncan Smith

Kylotan said:
Is there a practical way to use Pychecker in Windows? It doesn't work
under IDLE. (In fact, it seems to end up breaking everything, and
every subsequent statement and expression I execute gets ignored.)
Running it from the Python interpreter in DOS means everything scrolls
off the screen. Ideally I'd like to redirect it to a file, or be able
to use it in IDLE.

It seems to work for me in IDLE (well enough for my purposes, anyway).
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)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
 
K

Kylotan

Duncan Smith said:
It seems to work for me in IDLE (well enough for my purposes, anyway).

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?)
 
D

Duncan Smith

Kylotan said:
"Duncan Smith" <[email protected]> wrote in message

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?)

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
 
S

SM

Is there a practical way to use Pychecker in Windows? It doesn't work
under IDLE. (In fact, it seems to end up breaking everything, and
every subsequent statement and expression I execute gets ignored.)
Running it from the Python interpreter in DOS means everything scrolls
off the screen. Ideally I'd like to redirect it to a file, or be able
to use it in IDLE.

PyChecker is integrated in SPE, an python IDE built on wxWindows.
Maybe you coud try that.
http://spe.pycs.net
Good luck,
Stani
 
H

Harald Massa

Kylotan,

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,754
Messages
2,569,528
Members
45,000
Latest member
MurrayKeync

Latest Threads

Top