Re: Query regarding sys.stdout.write

2015-06-07 Thread Chris Angelico
On Mon, Jun 8, 2015 at 11:56 AM, Cameron Simpson wrote: > If you want do do this version portably, hook into the Python curses module > and get the result of curses.tigetstr('el'). If that returns None, the > terminal does not support clear-to-end-of-line and you should use the > spaces-overwrite

Re: Query regarding sys.stdout.write

2015-06-07 Thread Cameron Simpson
On 08Jun2015 10:18, Chris Angelico wrote: On Mon, Jun 8, 2015 at 7:17 AM, Sreenath Nair wrote: I have a general query about the following snippet: import os Import sys for each_dir in os.listdir("/home/tmpuser"): full_path = os.path.join("/home/tmpuser", each_dir) sys.stdout.write("\r

Re: Query regarding sys.stdout.write

2015-06-07 Thread Chris Angelico
On Mon, Jun 8, 2015 at 7:17 AM, Sreenath Nair wrote: > I have a general query about the following snippet: > > import os > Import sys > for each_dir in os.listdir("/home/tmpuser"): > full_path = os.path.join("/home/tmpuser", each_dir) > sys.stdout.write("\r%s" % full_path) > sys.stdout

Re: Query regarding sys.stdout.write

2015-06-07 Thread Cecil Westerhof
On Sunday 7 Jun 2015 23:17 CEST, Sreenath Nair wrote: > I have a general query about the following snippet: > > import os > Import sys > for each_dir in os.listdir("/home/tmpuser"): > full_path = os.path.join("/home/tmpuser", each_dir) > sys.stdout.write("\r%s" % full_path) > sys.stdout.flush() >

Re: Query regarding sys.stdout.write

2015-06-07 Thread Cameron Simpson
On 08Jun2015 02:47, Sreenath Nair wrote: I have a general query about the following snippet: import os Import sys for each_dir in os.listdir("/home/tmpuser"): full_path = os.path.join("/home/tmpuser", each_dir) sys.stdout.write("\r%s" % full_path) sys.stdout.flush() The snippet is a s