On Thu, Jun 7, 2012 at 1:25 PM, Thanasis <thana...@asyr.hopto.org> wrote: > I used to use this python script to display the packages that would be > emerged when using the "--resume" option. But it does't work with > python3.2 interpreter: > > ~ # cat resume_list.py > import portage > > resume_list=portage.mtimedb["resume"]["mergelist"] > > for i in range(len(resume_list)): > print "="+resume_list[i][2] > ~ # > ~ # python ~/resume_list.py > File "/root/resume_list.py", line 6 > print "="+resume_list[i][2] > ^ > SyntaxError: invalid syntax > ~ # > > Q: Is there a way to make it work with python3.2 ? >
I believe parentheses are mandatory for print function in python 3.x. So try to change it to: print("="+resume_list[i][2]) Disclaimer: I do not know python. :)