Change figure window title in pylab
Based on Andrew' answer, if you use pyplot instead of pylab, then:
fig = pyplot.gcf()
fig.canvas.set_window_title('My title')
If you want to actually change the window you can do:
fig = pylab.gcf()
fig.canvas.set_window_title('Test')
Update 2021-05-15:
The solution above is deprecated (see here). instead use
fig = pylab.gcf()
fig.canvas.manager.set_window_title('Test')
You can also set the window title when you create the figure:
fig = plt.figure("YourWindowName")