pymel.util.common.inMaya

inMaya()

Returns True if called from a fully initialized Maya session.