I’m working on a huge Python module, like this:
import millions, and, billions, of, modules...
...lots of functions...
def myfunc
...with huge body
...more functions
I’d like to extract myfunc to its own module. However, tracking down all the imports I need is actually pretty tedious. Is there a way to do this automatically using Eclipse? I’m using Eclipse 3.7.0 with Aptana Studio plugin (and hence PyDev). There’s an “extract method” refactoring tool, but it doesn’t do this.
Ok, maybe this is easier than I thought:
It’s not automatic, but it’s relatively straightforward and painless.