Using the API of win32,the classname can be got through the tool named spy++,titlename is the name of the window.Here is the demo:
import win32gui
import win32api
classname = "ApplicationFrameWindow"
titlename = "计算器"
#获取句柄
hwnd = win32gui.FindWindow(classname, titlename)
#获取窗口左上角和右下角坐标
left, top, right, bottom = win32gui.GetWindowRect(hwnd)
print('%s,%s,%s,%s'%(left, top, right, bottom))