Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

svn update and param directory

Help
alessio
2010-01-02
2012-12-12
  • alessio
    alessio
    2010-01-02

    I would like to report a minor pronlem I had updating, with svn, to the current revision (10838). I got some puzzling behaviour, that I found were due to calls in my progam like:

         from topo import param

    instead of

         import param

    as correct in the new revision. The point is that the code does not raise any error, because svn did not deleted the old topo/param directory, just the *.py files inside, but the *.pyc are still there. I deleted the old directory manually.

    Alex

     
  • Hi Alex,

    Yes, Python can be very annoying about that.  I wish there was a way
    to tell it to warn if a .pyc bytecode file was being used without a
    corresponding .py source file existing anymore; it causes all sorts of
    confusion.  The safest thing to do is "make clean-pyc" in the
    topographica directory after any SVN update, but the only time that
    will matter is when we rename or move files, which is rare, so it's
    hard to get into the habit.  You could perhaps make a shell alias
    like:

      alias updatetopo "cd ~/topographica ; svn update ; make clean-compiled"

    (where clean-compiled does the same as clean-pyc but also cleans out
    saved generated C code files in ~/.python25_compiled/, which also
    sometimes cause problems with new updates.)

    Again, I wish I knew of a better solution!

    Jim