[Tutor] PyChecker: Installing and or Using

Dick Moores rdm at rcblue.com
Thu Aug 11 08:33:35 CEST 2005

It appears to me that I've found a bug in PyChecker (see below). Am I 


Resending my last post:

Kent Johnson wrote at 06:13 8/9/2005:
 >Dick Moores wrote:
 > > Win XP. Python2.4.
 > >
 > > Javier Ruere suggested getting PyChecker or PyLint. I found PyChecker
 > and
 > > put the pychecker-0.8.14 folder in
 > > C:\Python24\Lib\site-packages\PyChecker. I don't really know what I'm
 > > doing (obviously?), but I added
 > > C:\Python24\Lib\site-packages\PyChecker\pychecker-0.8.14\pychecker to
 >You should only do one of these; packages in site-packages are already
 >in the path, though you have too many levels of directories...the
 >install should do this right.
 > > My probably dumb question is, how do I "do" those things? I've tried
 > > "python setup.py install" at the command line (at Run, I entered cmd and
 > > then at the prompt in the window I entered python setup.py install. No
 > > good. Then I tried python pychecker/checker.py . I got:
 > >
 > > C:\Documents and Settings\Dick>python pychecker/checker.py
 > > 'python' is not recognized as an internal or external command,
 > > operable program or batch file.
 >You have to add 'C:\Python24' to your PATH environment variable, or give
 >the full path in the command line as
 >C:\Python24\python setup.py install
 >Also when you run setup.py you will have to be in the directory
 >containing setup.py.

OK, I got it to install. But now, when I try to use checker.py I get:

Warning (from warnings module):
    File "C:\Python24\lib\site-packages\pychecker\checker.py", line 609
      m = imp.init_builtin(moduleName)
DeprecationWarning: the regex module is deprecated; please use the re module

That line 609 is in this function in checker.py:

def fixupBuiltinModules(needs_init=0):
      for moduleName in sys.builtin_module_names :
          if needs_init:
              _ = Module(moduleName, 0)
          module = _allModules.get(moduleName, None)
          if module is not None :
              try :
                  m = imp.init_builtin(moduleName)
              except ImportError :
              else :
                  extra_attrs = _BUILTIN_MODULE_ATTRS.get(moduleName, [])
                  module.attributes = [ '__dict__' ] + dir(m) + extra_attrs

  >>> import sys
  >>> sys.builtin_module_names
('__builtin__', '__main__', '_bisect', '_codecs', '_codecs_cn',
'_codecs_hk', '_codecs_iso2022', '_codecs_jp', '_codecs_kr',
'_codecs_tw', '_csv', '_heapq', '_hotshot', '_locale', '_multibytecodec',
'_random', '_sre', '_subprocess', '_symtable', '_weakref', '_winreg',
'array', 'audioop', 'binascii', 'cPickle', 'cStringIO', 'cmath',
'collections', 'datetime', 'errno', 'exceptions', 'gc', 'imageop', 'imp',
'itertools', 'marshal', 'math', 'md5', 'mmap', 'msvcrt', 'nt',
'operator', 'parser', 'regex', 'rgbimg', 'sha', 'signal', 'strop',
'struct', 'sys', 'thread', 'time', 'xxsubtype', 'zipimport')

What now?


More information about the Tutor mailing list