1. I do this sort of refactoring all the time. I get very good & fast results simply using shell tools -- find, grep, sed. Especially with the case you mention, where you really need only change import statements, this is very adequate. I'm definitely -1 on integrated refactoring tools; I want it to be me that knows the code, not some Big Brother of an IDE. If I run into problems, that means my shell chops aren't good enough, and if I relied on a refactoring tool, they wouldn't get better. (With languages like Java, OTOH, I don't particularly want to know it, so getting a behemoth like Eclipse to perform such tasks is more attractive!)
      posted by Jacob at 06:22:21 PM on September 16, 2004  
  2. "grep -w" will find Foo or module.Foo but not find FooHandler, which seems what you want.

    Using some coverage tool in addition to your test suite, to make sure that all lines of code have been exercised, should make you 100% confident that simple import errors won't happen in production.
      posted by Gary Capell at 08:14:28 PM on September 16, 2004  
  3. I dunno how stable BRM is, but I'd try to use it.
    But I don't see the statically typed thing as relevant, what you really need is
    - a good tool
    - a good test suite

    The former is probably not available for python, but it is for every smalltalk out there (and ST is quite dynamic ;), the latter is up to you.
    My approach is to change the obvious stuff, run the test suite, get some error and fix them and go on till evrything passes again. Almost the same than fail compilation/change/recompile
      posted by gabriele at 03:49:10 AM on September 17, 2004  
  4. Static typing allows one to predict accurately what the program will do, what <@x.y@> exactly refers to, etc. Tools like Eclipse put this to good use. It's not (always) possible in languages like Python where expressions like <@x.y@> aren't resolved until they are actually executed. So one needs a different approach there. Test suites are very suitable, as you already mentioned.

    Smalltalk is a different bowl of soup altogether... I believe the Smalltalk refactoring browsers work with live objects, rather than code in a text file. But I could be wrong; I haven't actually used a real Smalltalk system, much less a refactoring browser for it.
      posted by Hans Nowak at 11:36:23 AM on September 17, 2004  
  5. That should have been x.y, etc...
      posted by Hans Nowak at 11:36:47 AM on September 17, 2004  
  6. Ever hear of PyChecker? Good tool. Never refactor without it.
      posted by Christopher Armstrong at 06:11:07 PM on September 19, 2004  
  7. I think Bicycle Repair Man would be the way to go. Admittedly, I've only used it on a codebase with ~20 modules, but it performed flawlessly. Recommended.
      posted by Frank Horowitz at 08:33:57 PM on September 19, 2004  
  8. The eric3 IDE provides refactoring based on Bicycle Repair Man.
    Not the only reason to work with it.
      posted by Stefan Quandt at 02:58:44 PM on September 21, 2004