Is there a tool in python to rewrite some code that imports such things that they have nothing more to import?
Take the library that draws the box.py window
def box(text='Hello, World!')
draw the box magic
return
Now in another program (let's call it warning.py), it says:
from box import box
box('Warning, water found in hard drive')
Is there a tool that I can use that will see that it imports a window function (or class, for that matter) from the window and inserts this function (or class or even variable definitions) into a warning.py script removing the import line (which makes it more portable)?
Thanks, Narnie
source
share