Hi,
Is there any way to make Pharo and Python communicate? Thanks, Alberto _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
Depends what level....
At a high level you could use OSProcess to invoke the correct Python command line and do it in a different process. Or you could use some socket protocol if you have a python interpreter already running waiting for commands. or a mixture of the two... At a lower level you could look to link Python as a C library. cheers, Mike On Tue, Sep 28, 2010 at 10:56 PM, Alberto Bacchelli <[hidden email]> wrote: > Hi, > > Is there any way to make Pharo and Python communicate? > > Thanks, > Alberto > > _______________________________________________ > Pharo-project mailing list > [hidden email] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project > _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
There is a Python bridge plugin. But its not open source.
On 29 September 2010 01:30, Michael Roberts <[hidden email]> wrote: > Depends what level.... > At a high level you could use OSProcess to invoke the correct Python > command line and do it in a different process. Or you could use some > socket protocol if you have a python interpreter already running > waiting for commands. or a mixture of the two... > > At a lower level you could look to link Python as a C library. > > cheers, > Mike > > On Tue, Sep 28, 2010 at 10:56 PM, Alberto Bacchelli > <[hidden email]> wrote: >> Hi, >> >> Is there any way to make Pharo and Python communicate? >> >> Thanks, >> Alberto >> >> _______________________________________________ >> Pharo-project mailing list >> [hidden email] >> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >> > > _______________________________________________ > Pharo-project mailing list > [hidden email] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project > -- Best regards, Igor Stasenko AKA sig. _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
Or use HTTP (a RESTful webservice with JSON is straightforward to implement on both sides).
Adrian On Sep 29, 2010, at 00:43 , Igor Stasenko wrote: > There is a Python bridge plugin. But its not open source. > > On 29 September 2010 01:30, Michael Roberts <[hidden email]> wrote: >> Depends what level.... >> At a high level you could use OSProcess to invoke the correct Python >> command line and do it in a different process. Or you could use some >> socket protocol if you have a python interpreter already running >> waiting for commands. or a mixture of the two... >> >> At a lower level you could look to link Python as a C library. >> >> cheers, >> Mike >> >> On Tue, Sep 28, 2010 at 10:56 PM, Alberto Bacchelli >> <[hidden email]> wrote: >>> Hi, >>> >>> Is there any way to make Pharo and Python communicate? >>> >>> Thanks, >>> Alberto >>> >>> _______________________________________________ >>> Pharo-project mailing list >>> [hidden email] >>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >>> >> >> _______________________________________________ >> Pharo-project mailing list >> [hidden email] >> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >> > > > > -- > Best regards, > Igor Stasenko AKA sig. > > _______________________________________________ > Pharo-project mailing list > [hidden email] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
In reply to this post by Alberto Bacchelli
On 9/28/2010 4:56 PM, Alberto Bacchelli wrote:
Hi,
Hello Alberto, I have been much in the same situation. I am developing a financial technical analysis application in Pharo. Part of my requirements are the use of a Windows COM dll. I do not have the ability to use that dll from within Pharo. (My skills are too limited) I have written the front end/back end of my application in Python interfacing the dll and the financial server. I am writing the middle part of the application in Pharo using Seaside. My Python app will call my Seaside app with the necessary data and my Seaside app will provide the Python app the necessary actions. This also enables me to provide a web interface to my application. Numpy is an attractive option. I have been a long time Squeak (and now Pharo) user. I much prefer Pharo to Python. With my learning about the Matrix class I wasn't as dependent on Numpy. I switched to Pharo. Presently I am providing my own calculations and formulas and wasn't dependent on the statistics in Numpy. I would love to drop the Python dependency completely. Hopefully in time that will come. Any way, that is how I am using Python and Pharo. Jimmie _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
Free forum by Nabble | Edit this page |