I need to get size of the window in Python and assign it to the variable. I'm trying with this:
windowSize = '''
tell application "System Events" to tell application process "%(app)s"
get size of window 1
end tell
''' % {'app': app} // app = "Terminal
(wSize, error) = Popen(['osascript', '/Setup.scpt'], stdout=PIPE).communicate()
print("Window size is: " + wSize)
I get this error only: TypeError: can only concatenate str (not "bytes") to str
I'm completely new to Python so I hope you can help me with it