Integrating another library in squaeak

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Integrating another library in squaeak

nelson -
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


Reply | Threaded
Open this post in threaded view
|

Re: Integrating another library in squaeak

Göran Krampe
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

Reply | Threaded
Open this post in threaded view
|

Re: Integrating another library in squaeak

nelson -
hi

2006/3/23, [hidden email] <[hidden email]>:
Hi!



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


thanks!

 

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



thanks,
  nelson



Reply | Threaded
Open this post in threaded view
|

Re: Integrating another library in squaeak

Markus Gälli-3
>
>
>
> 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
>
Right! Another unconventional and probably faster way to connect from  
Squeak to Python via sockets would be to use OSC.
http://minnow.cc.gatech.edu/squeak/5836

Cheers,

Markus


Reply | Threaded
Open this post in threaded view
|

Re: Integrating another library in squaeak

nelson -
hi!



Right! Another unconventional and probably faster way to connect from
Squeak to Python via sockets would be to use OSC.
http://minnow.cc.gatech.edu/squeak/5836

Cheers,

Markus


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




Reply | Threaded
Open this post in threaded view
|

Re: Integrating another library in squaeak

Markus Gälli-3
Ni Nelson,




Right! Another unconventional and probably faster way to connect from
Squeak to Python via sockets would be to use OSC.
http://minnow.cc.gatech.edu/squeak/5836

Cheers,

Markus


Thank Marcus for your answer.  I see OSC, but it seems too linked to sound applications :) 

That's what it says - but it is a misnomer in my humble opinion.

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

I want to control from Squeak a remote object written in Python, that's my goal :)

nelson