import win32gui
import win32process
import win32api
import traceback

# This software is coypright 2012 by Thomas Dickerson
# and StickFigure Graphic Productions
# under the terms of the GNU General Public License v3
# a copy of which may be obtained here: http://www.gnu.org/licenses/gpl-3.0.txt
	
def windowprint(handle, junk):
	classname = win32gui.GetClassName(handle)
	text = win32gui.GetWindowText(handle)
	pid = win32process.GetWindowThreadProcessId(handle)
	print "Classname: " + str(classname) + " Text: " + str(text) + " pids " + str(pid)
win32gui.EnumWindows(windowprint, None)
