python print binary to stdout