pymel.core.system.listNamespaces

listNamespaces(root=None, recursive=False, internal=False)

Returns a list of the namespaces in the scene