I've inherited a large codebase that is practically the definition of "legacy", with all that entails. I've spent a lot of time removing unused code, renaming variables, creating classes, moving global variables to locals (let's stuff all our program state into a single module and then just import that whenever we want to access it!), and so on, and now I want to start cleaning up the dependency chains between different modules.
There's several places where I've had to move an import statement from being at the top of the module to being inside a function right before it's used, to prevent circular dependencies from causing imports to fail at program start. I wouldn't be surprised if I've rendered many of these imports moot, but short of a fair amount of painful grepping across ~20k lines of Python, I don't know of an easy way to find them. Is there a tool that examines your actual and apparent dependencies? I know there are programs that will generate dependency graphs, but for those there's little difference between a tight coupling and a single import statement that isn't actually needed. (Though if you'd care to recommend a dependency graph generator, I'd like to hear about that too) -Chris
_______________________________________________ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG