Hi all,
I have some beautilful libraries written in python and i want to call them from smalltalk. It would be great to make this "integration" platform independent. What is the way that i can follow? (in windows i think i can make a COM server, but i prefer a general solution, if possible :) ) thanks, nelson |
Hi!
I missed the post below in my other answer so: "nelson -" <[hidden email]> wrote: > Hi all, > I have some beautilful libraries written in python and i want to call > them from smalltalk. It would be great to make this "integration" platform > independent. What is the way that i can follow? (in windows i think i can > make a COM server, but i prefer a general solution, if possible :) ) > > thanks, > nelson Well, you could try making a "python plugin" that embeds the Pythin interpreter in a plugin. See more details at: http://www.python.org/doc/faq/extending But this is not a simple thing to do, you need to dabble around in C and learn the voodoo of plugin making, even though there are several examples to look at. A simpler approach with much worse performance (but it might not be a problem for you) is to simply try using SOAP. There are probably more ways to do it too. regards, Göran |
hi
2006/3/23, [hidden email] <[hidden email]>: Hi! thanks! But this is not a simple thing to do, you need to dabble around in C and I think to SOAP too. My library has to process some big dataset for datamining, so the performance wouldn't be a problem. On the other hand, if i can interface directly from python it would be cleaner... There are probably more ways to do it too. thanks, nelson |
>
Right! Another unconventional and probably faster way to connect from
> > > But this is not a simple thing to do, you need to dabble around in > C and > learn the voodoo of plugin making, even though there are several > examples to look at. > > A simpler approach with much worse performance (but it might not be a > problem for you) is to simply try using SOAP. > > I think to SOAP too. My library has to process some big dataset for > datamining, so the performance wouldn't be a problem. On the other > hand, if i can interface directly from python it would be cleaner... > > > There are probably more ways to do it too. > > regards, Göran > Squeak to Python via sockets would be to use OSC. http://minnow.cc.gatech.edu/squeak/5836 Cheers, Markus |
hi!
Thank Marcus for your answer. I see OSC, but it seems too linked to sound applications :) I want to control from Squeak a remote object written in Python, that's my goal :) nelson |
Ni Nelson,
What it does is to provide an easy to use interface to send some messages with integers, strings, symbols, floats etc from one OSC-enabled application to another, be it on the same computer or somewhere else. I cannot find anything sound related in the specification of OSC: Guess the skepticism stems from the fact that "udp does not provide the reliability and ordering guarantees that tcp does", which makes it certainly more suitable for media streaming than for power plant controlling. ;-) - Right now the squeak-version is based on udp but it would be easy to change it to tcp. Conclusion If you really considered Soap, you might as well consider OSC. Advantage: Probably faster than Soap Disadvantage: You might have to enable both OSC implementations on Squeak and Python using tcp, if you wanted to be on the "100%" sure side. Cheers, Markus
|
Free forum by Nabble | Edit this page |