ps_mem.py: more python 3 tweaks