I've setup a simple UI w/a textScrollBox so I can keep a list of my
scripts and reload any of them by clicking.  But the 'import' and
'reload' statements don't like that idea - they need a module.
Can anyone help?
def reloadScript():
    # Query textScrollList for selected script:
    selectedScript = cmds.textScrollList('scriptList', q=1, si=1)[0] #
Items returned as a list
    print selectedScript #This works and prints the name of the
hilighted script in the textScrollBox

    import selectedScript
    # ImportError: No module named selectedScript #
    reload (selectedScript)
        # TypeError: reload() argument must be module #

-- 
http://groups.google.com/group/python_inside_maya

Reply via email to