[Product-Developers] Calling a python 2.6 script from Plone 3

Raphael Ritz r.ritz at biologie.hu-berlin.de
Mon Oct 31 11:37:09 UTC 2011


On 10/31/11 10:29 AM, Mike Metcalfe wrote:
> Hi,
>
> I'm maintaining a Plone 3.3.5 add-on product that now needs to take a
> photo with a webcam. The python package I'd like to use is python-opencv
> which is only available for python 2.6. I created a script to take the
> photo which works when called from a terminal. But when I call it from
> inside plone with os.subprocess (or system) I get a Python C API version
> mismatch RuntimeWarning and "NameError: name 'OverflowWarning' is not
> defined". Any ideas of how I can prevent this? Or should I rather find a
> python 2.4 package instead.

Have you tried using popen insted

http://docs.python.org/library/popen2.html

While it is now deprecated it should be perfectly fine
to use from Python 2.4

Raphael


>
> BTW, I initially used a javascript product (jpegcam) to take a photo but
> I couldn't get a decent quality photo.
>
> Regards,
>
> --
> Mike Metcalfe
>
> mike at webtide.co.za
> <mailto:mike at webtide.co.za>
> www.webtide.co.za <http://www.webtide.co.za/>
>
>
>
> _______________________________________________
> Product-Developers mailing list
> Product-Developers at lists.plone.org
> https://lists.plone.org/mailman/listinfo/plone-product-developers




More information about the Product-Developers mailing list