Typo! > getstderr P3 # STDOUT ^^^^
Should have been "getstdout" Although... if left at getstderr the error also goes away. (Add that to my bullet list.) My haven't-grokked-the-code psychic abilities tell me that "getstdout" does something Real Bad to the stdout filehandle and any later uses of it (with print?) cause segfaults.