Jeff Epler wrote:
On Sun, Apr 03, 2005 at 09:49:42PM -0600, Steven Bethard wrote:

Slick. Thanks!

does isatty() actually work on windows? I'm a tiny bit surprised!

Hmm... I was just talking about using iter(f.readline, ''), but it does appear that isatty returns True for sys.stdin in the interactive prompt:


ActivePython 2.4.1 Build 245 (ActiveState Corp.) based on
Python 2.4.1 (#65, Mar 30 2005, 09:33:37) [MSC v.1310 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
py> os.isatty(sys.stdin.fileno())
True


and at least some other things return False:

py> os.isatty(file('temp.txt').fileno())
False



STeVe
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to