Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Patch for setting title of Command Prompt in windows #3
Comments
|
Just wanted to clarify that, even if this issue has been open for a long time, I'm not against this feature. However, I'd like it to be optional (because it does not work on Linux virtual terminals, for example), to work on every platform, and not to launch a program every time the title has to be changed. |
|
setting title on linux: http://www.faqs.org/docs/Linux-mini/Xterm-Title.html
|
|
Implemented by grawity and merged. |
Was: http://bitbucket.org/rg3/youtube-dl/issue/214/
So I have tweaked my little patch so that it doesn't do bad things on linux/mac. Note the check for the os.
def report_progress(self, percent_str, data_len_str, speed_str, eta_str): """Report download progress.""" if self.params.get('noprogress', False): return if (os.name == 'nt'): os.system('title youtube-dl [%s]' % percent_str) self.to_stdout(u'\r[download] %s of %s at %s ETA %s' % (percent_str, data_len_str, speed_str, eta_str), skip_eol=True)