1

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

skaffman
  • 398,947
  • 96
  • 818
  • 769
Bryan
  • 551
  • 4
  • 9
  • 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 May 12 '10 at 13:06
  • 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 Sep 09 '10 at 15:17

1 Answers1

1

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

Lukas Cenovsky
  • 5,476
  • 2
  • 31
  • 39
  • I tried using Ironclad and it enables me to import the P4 Python API but basic functionality is not working. Thanks for the suggestion of Ironclad. – Bryan May 07 '10 at 16:38