sjitech / mac_list_windows_pids

Mac OS X: list all windows title and their owner process ids

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SyntaxError: invalid syntax

cameo69 opened this issue · comments

Hi, could you give me any hint why I am getting this error?

File "lswin.py", line 12
print 'PID'.rjust(7) + ' ' + 'WinID'.rjust(5) + ' ' + 'x,y,w,h'.ljust(21) + ' ' + '\t[Title] SubTitle'
^
SyntaxError: invalid syntax

Running this with python v3.7.4 from brew on Mac Catalina.

commented

sorry, the script seems does not work on python 3+,
it should be print('PID'.rjust(7) + ' ' + 'WinID'.rjust(5) + ' ' + 'x,y,w,h'.ljust(21) + ' ' + '\t[Title] SubTitle')

Ah, tnx, ran it with python 2 and it works.