Notice: I checked for duplicate and nothing clearly answers my question. I trust you\'ll let me know if I missed something!
In an effort to clean up my code, I have been
What about making classes and use just what you will need, fx: class one:
import cv2
from SIGBWindows import SIGBWindows
from SIGBAssg import *
class two:
import cv2
import numpy as np
from pylab import *
from scipy.cluster.vq import *
from scipy.misc import imresize
class three:
import cv2
import numpy as np
and Finally where we call the object:
import cv2
from SIGBWindows import SIGBWindows
from SIGBAssg import *
windows = SIGBWindows(mode="video")
windows.openVideo("somevideo.avi")
kmeans(windows)
I don't know if it is what you are looking for, but this approach it makes the code really clean and easy to add more features to it.