Option to pass a file-object to Px constructor