1
votes

Is it possible to use P4Python (the perforce python api) with IronPython? I'd like to use the python api because it seems much faster than using p4.net implementionat of a Perforce API but when I try to import p4 into IronPython I receive the following error.

IronPython 2.6.1 (2.6.10920.0) on .NET 4.0.30128.1 Type "help", "copyright", "credits" or "license" for more information.

import P4 Traceback (most recent call last): File "", line 1, in File "C:\Program Files\IronPython 2.6 for .NET 4.0\lib\site-packages\P4.py", l ine 210, in ImportError: No module named P4API

1
I'm surprised that p4.net is slower than using p4python as p4.net wraps the native perforce c/c++ api. There will be a bit of an overhead due to marshalling etc but it shouldn't be significant. What are the specific bottlenecks you're finding? - zebrabox
I must have been misusing p4.net, because I went back and revisited the api and reimplemented in a new project and it's working perfectly. - Bryan

1 Answers

1
votes

I guess P4API is CPython extension so it does not work in IronPython. In that case, try ironclad.