I'm not sure if this directly addresses your issue, but here's a solution I 
found for accessing the win32clipboard in Maya 2008. It works for our pipeline 
which adds the rest of the win32 python dependencies to the system path on 
startup before calling this function:

def prepMayaForWin32():
    import shutil
    MayaLoc = os.environ['MAYA_LOCATION'].replace('/','\\')
    bin = MayaLoc+"\\bin"
    P4bin = 'C:\\source\\to\\your\\python.dll\\files\\for\\sharing'
    os.chmod(P4bin,0777)
    if os.path.isdir(P4bin):
        showError = False
        for filename in ["pythoncom25","pywintypes25"]:
            dest = "%s\\%s.dll" % (bin,filename)
            os.system('attrib -r -s "%s"' % bin)
            if not os.path.isfile(dest):
                print "shutil.copy('%s\\%s.dll' % (P4bin,filename),'%s\\' % 
bin)"
                try:
                    shutil.copy("%s\\%s.dll" % (P4bin,filename),"%s\\" % bin)
                except:
                    showError = True
        if showError:
            print "until further notice, Windows 7 cannot allow proper 
permissions to be set from script."
            print "A possible work-around is to launch Maya by right clicking 
and running as Administrator."
            print "if you want to use extended python functions (like 
clipboard),\ncopy all files from %s to %s" % (P4bin,bin)

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].


Reply via email to