Python output only for 2.5 ??

Ranorex Studio, Spy, Recorder, and Driver.
vonBrabant
Posts: 15
Joined: Wed May 23, 2007 11:12 pm

Python output only for 2.5 ??

Post by vonBrabant » Sat Nov 17, 2007 3:58 pm

Hi,
I'm just testing the Python output of the recorder and have some problems with my Python 2.4. imp.load_dynamic isn't working, and if I replace it with import RanorexPython as Ranorex, Ranorex.FormFind doesn't work.

So I wonder if the output is Python 2.5 specific ??

Thanks

vonBrabant

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Post by Support Team » Mon Nov 19, 2007 12:01 pm

The generated Python scripts are not specific to Python 2.5. However, the code assumes that the RanorexPython.dll is in the same directory as the generated Python script file.

So, please be sure to have the RanorexPython.dll and the RanorexCore.dll in the same directory as the Python script you want to interpret.

Regards,

Alex
Ranorex Support Team

vonBrabant
Posts: 15
Joined: Wed May 23, 2007 11:12 pm

Post by vonBrabant » Mon Nov 19, 2007 3:41 pm

Okay, thanks for the reply.
However, I installed now Python 2.5 and everything is now working.

It is actually simpler than you describe it !
With Python2.5 one can still copy RanorexPython.dll and RanorexCore.dll in the Python25/DLLs folder and load the module with "import RanorexPython as Ranorex". The only trick is to rename RanorexPython.dll to RanorexPython.pyd. This works because internally a pyd is a dll.
Just wanted to let you know.

vonBrabant

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Post by Support Team » Mon Nov 19, 2007 5:05 pm

Thanks for the info! We'll update the user guide accordingly.

Alex
Ranorex Support Team