This command causes the title of the window specified as an argument to be linked to the current file and selection. When selection changes, the window title will change to show the current file name and the name of the last selected object.
Derived from mel command maya.cmds.showSelectionInTitle
Example:
import pymel.core as pm
import maya.cmds as cmds
window = pm.window(widthHeight=(400, 100))
pm.paneLayout()
# Result: ui.PaneLayout('window1|paneLayout16') #
pm.scrollField(wordWrap=True, text='The title of this window will reflect the current object selection.')
# Result: ui.ScrollField('window1|paneLayout16|scrollField7') #
pm.showWindow(window)
pm.showSelectionInTitle(window)
pm.sphere()
# Result: [nt.Transform(u'nurbsSphere1'), nt.MakeNurbSphere(u'makeNurbSphere1')] #