Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Pychecker under Windows

0 views
Skip to first unread message

Kylotan

unread,
Nov 25, 2003, 11:16:48 PM11/25/03
to
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.

--
Ben Sizer

Steve Holden

unread,
Nov 26, 2003, 1:17:47 AM11/26/03
to
"Kylotan" <kyl...@hotmail.com> wrote ...

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"


John Roth

unread,
Nov 26, 2003, 7:22:48 AM11/26/03
to

"Steve Holden" <sho...@holdenweb.com> wrote in message
news:iEXwb.1475$US3.586@okepread03...

> "Kylotan" <kyl...@hotmail.com> wrote ...
> > 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").

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

Kylotan

unread,
Nov 26, 2003, 9:20:26 AM11/26/03
to
"Steve Holden" <sho...@holdenweb.com> wrote in message news:<iEXwb.1475$US3.586@okepread03>...

> 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

Peter Hansen

unread,
Nov 26, 2003, 9:31:07 AM11/26/03
to

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

Henrik Weber

unread,
Nov 26, 2003, 9:56:07 AM11/26/03
to
kyl...@hotmail.com (Kylotan) wrote in message news:<153fa67.03112...@posting.google.com>...

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/groups?hl=de&lr=&ie=UTF-8&selm=44254d3d.0308050441.3ae97677%40posting.google.com

-- Henrik

Duncan Smith

unread,
Nov 26, 2003, 10:35:00 AM11/26/03
to

"Kylotan" <kyl...@hotmail.com> wrote in message
news:153fa67.03112...@posting.google.com...

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


Kylotan

unread,
Nov 26, 2003, 3:06:02 PM11/26/03
to
"Duncan Smith" <buz...@urubu.freeserve.co.uk> wrote in message news:<bq2h2i$9so$1...@news6.svr.pol.co.uk>...

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

--
Ben Sizer

Duncan Smith

unread,
Nov 26, 2003, 4:19:13 PM11/26/03
to

"Kylotan" <kyl...@hotmail.com> wrote in message
news:153fa67.03112...@posting.google.com...

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

SM

unread,
Dec 3, 2003, 11:11:58 AM12/3/03
to
kyl...@hotmail.com (Kylotan) wrote in message news:<153fa67.03112...@posting.google.com>...

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

Harald Massa

unread,
Dec 3, 2003, 2:36:55 PM12/3/03
to
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

0 new messages