#import win32gui, win32ui, win32con #import Image #import win32clipboard #from VideoCapture import Device import os def capture2jpg(filename): command1 ='screencapture ' + filename print command1 iret = os.system(command1) def captureactivewin2jpg(filename): command1 ='screencapture -iW ' + filename print command1 iret = os.system(command1) def captureclipboard2jpg(filename): command1 ='screencapture -i ' + filename print command1 iret = os.system(command1) def capturecamold(filename): cam = Device() cam.saveSnapshot(filename,timestamp=3, boldfont=1) if __name__ == "__main__": capture2jpg('tmp6.jpg')