473,387 Members | 1,453 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Pychecker under Windows

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
Jul 18 '05 #1
10 3790
"Kylotan" <ky*****@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").

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"


Jul 18 '05 #2

"Steve Holden" <sh*****@holdenweb.com> wrote in message
news:iEXwb.1475$US3.586@okepread03...
"Kylotan" <ky*****@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
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"

Jul 18 '05 #3
"Steve Holden" <sh*****@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
Jul 18 '05 #4
Kylotan wrote:

"Steve Holden" <sh*****@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.


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
Jul 18 '05 #5
ky*****@hotmail.com (Kylotan) wrote in message news:<15*************************@posting.google.c om>...
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/groups?hl=de...ing.google.com

-- Henrik
Jul 18 '05 #6

"Kylotan" <ky*****@hotmail.com> wrote in message
news:15*************************@posting.google.co m...
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


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
Jul 18 '05 #7
"Duncan Smith" <bu*****@urubu.freeserve.co.uk> wrote in message news:<bq**********@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
Jul 18 '05 #8

"Kylotan" <ky*****@hotmail.com> wrote in message
news:15*************************@posting.google.co m...
"Duncan Smith" <bu*****@urubu.freeserve.co.uk> wrote in message

news:<bq**********@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


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

Jul 18 '05 #9
SM
ky*****@hotmail.com (Kylotan) wrote in message news:<15*************************@posting.google.c om>...
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
Jul 18 '05 #10
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

Jul 18 '05 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
by: achrist | last post by:
The pychecker site says that pychecker works with versions 1.5 through 2.2. Any reason to expect that 2.3 breaks it? Anyone tried it to see? TIA Al
0
by: Pedro Werneck | last post by:
Hi, I don't know if I should ask this here or on an emacs group/list. If I choose wrong, please forgive me. I am trying to run pychecker on the current buffer on python-mode using the...
1
by: Neal Norwitz | last post by:
A new version of PyChecker is (finally) available for your hacking pleasure. It's been quite a while since the last release--11 months. I wish there was more progress, but such is life. Many bug...
12
by: Stephen Ferg | last post by:
I've just spent several very frustrating hours tracking down a bug in one of my programs. The problem was that I was writing text to a file, and when I was done I coded f.close when I should...
4
by: beliavsky | last post by:
If I run PyChecker on the following program, stored in xtry.py, m = 10000000 k = 0 for i in xrange(m): k = k + i print k x = range(3) print x
8
by: Frans Englich | last post by:
Hello, I take PyChecker partly as an recommender of good coding practice, but I cannot make sense of some of the messages. For example: runner.py:878: Function (main) has too many lines (201)...
21
by: Philippe Fremy | last post by:
Hi, I would like to develop a tool that goes one step further than pychecker to ensure python program validity. The idea would be to get close to what people get on ocaml: a static verification...
1
by: Neal Norwitz | last post by:
Special thanks to Ken Pronovici. He did a lot of work for this release and helped ensure it occurred. Version 0.8.15 of PyChecker is available. It's been over a year since the last release. ...
4
by: Anthony Greene | last post by:
Howdy, I had the impression that pychecker caught and reported such dynamic syntactical errors. #!/usr/bin/env python def add(i): i += 10 status = 3
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.