Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Can an external application run via Plomino

Help
2011-04-17
2013-04-25
  • I have a many applications for a web based program that require an interface to an application outside plone. Python allows such  communication via a number of system calls e.g. I tried this simple code to print a document

    import os
    cmd = 'lpr /home/dad/optim/cofc.eps'
    os.system(cmd)

    It works as a python script but didn't work from with plomino.

    Is there a way of interfacing with the outside world from with Plomino?

    Thanks in advance
    John Mahon

     
  • Eric Brehault
    Eric Brehault
    2011-04-18

    Hello,

    It is possible to declare pluggable PlominoUtils (=functions that can be called from any Plomino formula) from an external product.
    This is how to do it:
    https://plomino.svn.sourceforge.net/svnroot/plomino/trunk/Plomino/docs/CUSTOMUTILS_HOWTO.txt

    Note: it is not released yet, you will need to use the svn version (or wait the next release, which should be released this week)

    Eric

     
  • Eric

    Thank you for you quick reply. I am afraid I am a newbie and I did not understand your howto. Where does the code, outlined in you howto, go?

    Cheers
    John Mahon

     
  • Eric Brehault
    Eric Brehault
    2011-04-18

    ok, that's Plone development, if you are not a Plone developer, it is quite complex

    the code must o in a Python package and must be loaded by your Zope server

    there is no way to do it differently because Zope prevents using external package from any code edited via the web interface (for obvious security reason)
    to enable the usage of an external package, you must declare it as safe into a local package

    eric

     
  • Eric Brehault
    Eric Brehault
    2011-04-18

    maybe another way to implement what you want is to use a web service: you implement your functionnality the way you want (perl, php, ….) on any server (possibly  the same as the zope server) and you call it form plone via its url

    eric