Maya 2009 & perforce python api

hey all,
I am trying to get a little bit more serious and would like to get started with accessing p4 from within maya using their API (at secretly attempt to mess up with userSetup.py :scared:).
It all started simple and got obnoxious really quick.

I got myself setup with a workable python 2.5 distrib (in addition to the full 2.6 and 2.7 I had already installed) and dug through perforce ftp to find the proper p4python25.exe file to get the proper python files for maya 2009 internal version of python. Since that thing only allows itself to be installed if it can find a proper full 2.5 distribution installed :sigh:
I was then able to import the p4 module from within maya without error at last.

I got home and replicated the setup hoping I could get some stuff done, but I am now wondering if the maya 2009 64bit (win7 64bits) I have at home isn’t the reason why I now can’t import the p4 module. It gives me this error

from perforce.P4 import P4,P4Exception
# Error: DLL load failed with error code 193
# Traceback (most recent call last):
#   File "<maya console>", line 1, in <module>
#   File "E:\mayascript\perforce\P4.py", line 210, in <module>
#     import P4API
# ImportError: DLL load failed with error code 193 # 

The thing was imported without error earlier at work but on Maya 2009 32bits (running with xp64).

I would really like to avoid having to install a 32bits version of 2009 if I can.
any help greatly appreciated :nod:

Yeah you can’t use the 32 bit version of P4Python with a 64 bit version of Maya (64 bit python). You’ll have to compile p4python x64, or find it pre-compiled somewhere. Typically a 32/64 bit miss-match or a python version miss-match is the reason for a DLL import error.

if anyone manages to find a working version of P4 x64 for python 2.5 I’d be super happy, although personally I’ve given up on looking for one. Because it seems you cannot compile P4 itself - they don’t give you the source for the important parts :wink: All you can do is to compile PythonP4 against the pre-compiled P4 libraries. But there’s no x64 version of them that I managed to compile against using Visual C 2003 with the MS Platform SDK. P4 offers libraries for VC 2005 but Maya doesn’t like to import the compiled result. :frowning: I know stuff compiled with VC 2003 works with Maya 2009/2008 but maybe there’s another compiler that works? I basically reached the end of my knowledge here…

So I don’t think there’s a P4 x64 version for 2.5 out there :frowning:

thanks for the infos, I guess I am stuck then.

I’ll give it a shot here and check if there’s an engineer with the working knowledge of those kind of problems and who still has the painfully outdated tools and sdks up and running still.

edit: drats. I thought I was onto something, but I see Nathan already posted.