Setting win32 console title from Python
- From: "runes" <rune.strand@xxxxxxxxx>
- Date: 28 Apr 2005 03:30:15 -0700
Hi,
I'm trying to set the title of the console window (CMD.EXE) in Windows.
I want it set to the basename of the current directory and it should
stay after the script has finished.
Now, the console title is easily set with the DOS-command 'title
NewTitle'. But I'd like to do this from a Python script.
os.system('title NewTitle') will not do, because it spawns a new
process.
win32api.SetConsoleTitle('NewTitle') will not do either, because the
NewTitle is reset as soon as the script finishes.
Chris Gonnerman's WConio
<http://newcenturycomputers.net/projects/wconio.html>
has a settitle() method and
WConio.settitle("NewTitle") does what I want, but not under CMD.EXE,
only COMMAND.EXE.
Any ideas?
.
- Follow-Ups:
- Re: Setting win32 console title from Python
- From: jay graves
- Re: Setting win32 console title from Python
- From: Duncan Booth
- Re: Setting win32 console title from Python
- Prev by Date: Re: interactive web graphics
- Next by Date: Re: (PHP or Python) Developing something like www.tribe.net
- Previous by thread: Re: urllib2 file upload error
- Next by thread: Re: Setting win32 console title from Python
- Index(es):
Relevant Pages
|