PyChecker (http://pychecker.sourceforge.net ) ought save us from some
runtime errors. It is like lint.

Also, to promote team development successes we need to share information
(especially on classes and such).  I've been thinking about Javadoc-style
docs and tried getting a site like that out of pydoc, but failed. I
incorrectly assumed how it ought work, and as such missed the point.

[I think that is common with Python, it just isn't Java (however similar
much of it looks.) I just need to keep a fresh/open mind with this stuff.]

Anyway, I am having problems but I don't want to give up. I think this is
important. I think we need both pychecker (or similar) and pydoc working to
help Gump fly as a python project. If anybody can help (through looking at
docs/tinkering along with me, or from experience) please do.

PYCHECKER:

I can manually run pychecker (once installed) on our code. I can't (however)
seem to pass it 'gump' and have it read all modules/packages below gump.
Maybe it is just not used that way, but maybe that is 'cos we have problems
with __all__ in our packages. [Run pydoc to see the __all__ issue.]

I am trying to create (another) commitCheck.py to run before doing a commit.
I want that to run pychecker. I could fork the thing (and am about to try)
but I tried using the import solution. Python is quite wacky at times, and I
think (from best I can tell from docs/code) that the import runs the code, I
don't need to call some check() method.  [This is a shame, 'cos I don't
think I can test for problems or not. I've tried this, but it doesn't seem
to work. Any thoughts?

    try:
        # :TODO: PyChecker
        check=''
        for m in ['gump','gump/document','gump/model']:
            if check: check += ' '
            mPath=os.path.join(absGumpPython,m)
            check += str(mPath)
        print "Python Checker : [" + check + "]"
        os.environ['PYCHECKER'] = check
        import pychecker.checker
    except:
        print 'Failed to PyChecker code...'
        pass


PYDOC:

I've not managed to get a site built by pydoc, it seems to like to run
interactively or as it's own WWW server. This is cool. Go into the
gump/python directory, set PYTHONPATH=`pwd`, then run:

    python C:\Python23\lib\pydoc.py -p 1234 gump

and browsed:

    http://localhost:1234/

I wonder if we ought run an instance of this on one of the Apache servers
and point it at a version of Gump that we checkout from CVS each night.

BTW: If you do both you'll see a problem we seem to have with our source
code, that is stopping it from working correctly/fully. Help appreciated.

regards,

Adam
--
Experience the Unwired Enterprise:
http://www.sybase.com/unwiredenterprise
Try Sybase: http://www.try.sybase.com


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to