I can't seem to use os.read() on a pipe created with os.popen(); why?

os.read is a low-level function which takes a file descriptor, a small integer representing the opened file. os.popen creates a high-level file object, the same type returned by the open function. Thus, to read n bytes from a pipe p created with os.popen, you need to use p.read(n).

CATEGORY: library

 

A Django site. this page was rendered by a django application in 0.01s 2009-01-09 03:50:41.014594. hosted by webfaction.