I'm curious why this bit of code doesn't work. When run it returns a blank line. Note: this is making use of a linux device file so it should not be expected to run properly on Windows.
#!/usr/bin/env python import os infile = os.open("/dev/zero", os.O_RDONLY) charout = os.read(infile,1) os.close(infile) print charout
I'm pretty new to Python so I might be way off base. I appreciate any suggestions.