473,586 Members | 2,566 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Python to Python communication

Hello,

I have a group of Python programms which I want to teach to "talk to each
other".

All run on Windows, on the same computer or in the same intranet.
Security of communication is not an issue (encryption on lower level
protocols / intra computer communication). Partially these programs are
using wxPython.

It is important that the communcation is "only an added feature", I am
not willing to spend big memory / computing ressources on it.
So I googled and came up with at least the following opportunities:

XMLRPC - quite "simple" to implement within python, contained in my
favourite web framework Quixote / medusa

SOAP - around the same amount of work as XMLRPC

----> these two are fully buzzword compatible to enterprise communication
needs. But are they really lightwight and needed?
Banana - within the twisted framework. Is described as high performance
with very litte ressources. From my scanning of twisted it is meanwhile
possible to integrate it within wxPython and you only need to sell the
soul of your firstborn for it; but I got the impression twisted rather
needs a total commitment than a "I just need some banana, man"

pyro - Python Remote Objects. Irmen de Jong has a "get Firefox" icon on
it's page and he plays with the name "pyro", which makes a good
impression. It looks rather "ripe", but: he is talking about "pyro 4.0"
which will be incompatible with pyro 3.4 and a total redesign. That makes
me shudder.

COM / DCOM. From our favourite software company, available mainly within
windows. Wrapped excellently with pywin32 ... but needs some seriuos
type-mangeling to get through and around 2 Gig of Browser Cache to read
all the MSDN documentation, which is quite C-ish.

socket / select. Within the standard lib. Does not look to hard to get to
work, working samples included in the nutshell.

----

so, I am stranded ... and ask C.L.P. for recommendations .

What library have you used and would recommend?

Harald
Jul 18 '05 #1
9 2617
hi,
XMLRPC - quite "simple" to implement within python, contained in my
favourite web framework Quixote / medusa

SOAP - around the same amount of work as XMLRPC

----> these two are fully buzzword compatible to enterprise communication
needs. But are they really lightwight and needed?
Unless you don't need the connectivity to other non-python apps that depend
on using one of them, stay clear of those two. They are pretty slow,
primitive in the sense that all they give you is a stateless C-api-like
calls and by far not as mature as say corba. And last time I checked, the
SOAP-support in python was far from beeing complete. And that checking of
mine hasn't been too long ago.

Banana - within the twisted framework. Is described as high performance
with very litte ressources. From my scanning of twisted it is meanwhile
possible to integrate it within wxPython and you only need to sell the
soul of your firstborn for it; but I got the impression twisted rather
needs a total commitment than a "I just need some banana, man"
pyro - Python Remote Objects. Irmen de Jong has a "get Firefox" icon on
it's page and he plays with the name "pyro", which makes a good
impression. It looks rather "ripe", but: he is talking about "pyro 4.0"
which will be incompatible with pyro 3.4 and a total redesign. That makes
me shudder.
Don't used those two, but if I had a similar situation to yours (namely no
non-python-apps), I'd certainly give pyro a try.
COM / DCOM. From our favourite software company, available mainly within
windows. Wrapped excellently with pywin32 ... but needs some seriuos
type-mangeling to get through and around 2 Gig of Browser Cache to read
all the MSDN documentation, which is quite C-ish.
I use Linux, so I won't comment on that.
socket / select. Within the standard lib. Does not look to hard to get to
work, working samples included in the nutshell.


Been down that road - but while its quick to start, it nearly as fast gets
tedious as your requirements develop - usually, you end up with your own
xmlrpc-style implementation. Better skip that.

I personally have very good expiriences with corba - omniORBpy, to be
precise. Don't know how well that runs on windows, though. But on *nix, it
certainly saved my day more than once.

Regards,

Diez
Jul 18 '05 #2
On Mon, 11 Oct 2004 12:40:07 +0000 (UTC), Harald Massa
<cp*********@sp amgourmet.com> wrote:
Hello,

I have a group of Python programms which I want to teach to "talk to each
other".

All run on Windows, on the same computer or in the same intranet.
Security of communication is not an issue (encryption on lower level
protocols / intra computer communication). Partially these programs are
using wxPython.

It is important that the communcation is "only an added feature", I am
not willing to spend big memory / computing ressources on it.

[SNIP]

pyro - Python Remote Objects. Irmen de Jong has a "get Firefox" icon on
it's page and he plays with the name "pyro", which makes a good
impression. It looks rather "ripe", but: he is talking about "pyro 4.0"
which will be incompatible with pyro 3.4 and a total redesign. That makes
me shudder.

[SNIP]
Harald

Harald,

I only have experience with Pyro, so am biased, but from your rather
sketchy
description I think it would have the smallest impact (in terms of existing
code re-work) as it can simply be bolted on with the inclusion of a couple
of extra classes. At least that was my experience when I needed to get a
couple
of python applications talking...

Just my tupence worth :-)

Martin

--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

Jul 18 '05 #3
Am Mon, 11 Oct 2004 12:40:07 +0000 schrieb Harald Massa:
Hello,

I have a group of Python programms which I want to teach to "talk to each
other".

All run on Windows, on the same computer or in the same intranet.
Security of communication is not an issue (encryption on lower level
protocols / intra computer communication). Partially these programs are
using wxPython.


Hi,

Before choosing a framework (pyro, socket or other) you should know
how you want to communicate.

The easiest is "client-server". There is one server and several
clients connect to it.

Peer to peer: There is no central server. All can talk to each other.
The problem is: How to find the other? If there are on one computer
this is easy: Just write files to a directory all processes know.
But if you want to talk to other computers, you need to know their
IP addresses.

For the communication UDP, TCP or HTTP can be used. I would not
use HTTP (XMLRPC or SOAP) if you don't need to. UDP is stateless,
and can be used for broadcasts.

I would use pyro or the socket module.

HTH,
Thomas

Jul 18 '05 #4
Harald Massa wrote:
I have a group of Python programs which I want
to teach to "talk to each other". What library have you used and would recommend?


I think this depends on what exactly the nature of
the "communication" .Do you want to send data across or
functionality.

XMLRPC and pyro are about sharing behavior:
functions or methods.

If you need to keep a connection open and keep
exchanging raw data, then sockets might make more sense.

Istvan.
Jul 18 '05 #5
[Harald Massa]
I have a group of Python programms which I want to teach to "talk to each
other".

[Thomas Guettler] Peer to peer: There is no central server. All can talk to each other.
The problem is: How to find the other? If there are on one computer
this is easy: Just write files to a directory all processes know.
But if you want to talk to other computers, you need to know their
IP addresses.


Or use a peer-to-peer library that has solved all of those problems already

http://www.python.org/other/spread/

regards,

--
alan kennedy
------------------------------------------------------
email alan: http://xhaus.com/contact/alan
Jul 18 '05 #6
Harald Massa wrote:
pyro - Python Remote Objects. Irmen de Jong has a "get Firefox" icon on
it's page and he plays with the name "pyro", which makes a good
impression.
Hey, thanks :)
It looks rather "ripe", but: he is talking about "pyro 4.0"
which will be incompatible with pyro 3.4 and a total redesign. That makes
me shudder.


Pyro is "ripe"... version 3.0 was released Q4, 2002, so the 3.x
versions have been around and in active use for 2 years now.

I've been talking about Pyro 4.0 for a long time, but we haven't
even begun the real design of it. Partly because of lack of time,
partly because Pyro 3.x does its job so well (not my own words).

What is it that makes you shudder?
If you don't want to switch to Pyro 4.0 once (if??) it is released,
just continue using Pyro 3.x. I have no intentions of abandoning
the 3.x version: if there is an itch, or a bug, it will be addressed.
Regards,

Irmen de Jong
Jul 18 '05 #7
A cheap solution for brainstorming: just output messages to files.

p1/001.msg
p2/002.msg
...etc...

Do some polling to pick up messages. This is very asynchronize and maybe
useful for some communication pattern.
Jul 18 '05 #8
Hello Irmen,
Pyro is "ripe"... version 3.0 was released Q4, 2002, so the 3.x
versions have been around and in active use for 2 years now.
That is really good information! Thank you. "active for 2 years" is
rather "mature" then only "ripe" :)))
I've been talking about Pyro 4.0 for a long time, but we haven't
even begun the real design of it.
What is it that makes you shudder?


Really exactly that :))) I do not know you at all; as I said: your
presentation, the documentation and the voices within c.l.p. give me a
very positive feeling towards you and your software. So all my
"shuddering " comes from this bits of information: "the author of a
product thinks to further develop it a complete redesign - not a gradual
upgrade - is necessary - so maybe I should wait for that" :)) And the
fear, that new ideas will be postponed to the imaginary future version.
(I tend do to such things with my own projects, too )

So I will give a very deep look at PyRo and spread... especially because
I need that "peer to peer"

Thank you all for your support!

Harald

Jul 18 '05 #9
Alan Kennedy <al****@hotmail .com> wrote in

[Thomas Guettler]
Peer to peer: There is no central server. All can talk to each other.
The problem is: How to find the other? If there are on one computer

Yes, considering my challenge "peer to peer" would fit best
Or use a peer-to-peer library that has solved all of those problems
already

http://www.python.org/other/spread/


Yeah, spread looks beautifull from it's documentation. But I failed in
setting up ... the python-module is prepared for spread 3.16.4, actual is
3.17.2, which has total different librarynames to start with ... so

python setup.py build --compiler=mingw3 2 fails badly when trying to link.

Has someone succeeded in doing a windows build for python 2.3.4 and spread
3.17.2 ??? I would be very thankfull for a howto or a spread.pyd :)

Harald
Jul 18 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

36
2608
by: Tim Churches | last post by:
If a compiled Python extension module B includes code from some other software A which is licensed only under the GPL, do other Python programmes, C, which import module B also need to be licensed under a GPL-compatible license (assuming C is/are to be distributed to third parties)? I think the answer is yes, both from a lay (IANAL) legal...
68
3726
by: Grant Edwards | last post by:
Let's say I use a GPL'd python module (e.g. something installed in site-packages) in an application. Let's also say I use py2exe to package and distribute said application. Is what I'm distributing a "derived work" of the GPL'd python? Or is py2exe's packaging of the module's .pyc file and my application code's .pyc files a "mere...
137
7034
by: Philippe C. Martin | last post by:
I apologize in advance for launching this post but I might get enlightment somehow (PS: I am _very_ agnostic ;-). - 1) I do not consider my intelligence/education above average - 2) I am very pragmatic - 3) I usually move forward when I get the gut feeling I am correct - 4) Most likely because of 1), I usually do not manage to fully explain...
6
2561
by: Gary Kshepitzki | last post by:
Hello I am trying to send an event from a Python COM server to a VB (or VB.NET) COM client. I am a newbie both in VB and in python. Can anyone give me a simple (but complete) code example both of the Python server side and the VB client side for raising a single event. Any answer would be highly appreciated. Regards Gary
9
2022
by: corey.coughlin | last post by:
Alright, so I've been following some of the arguments about enhancing parallelism in python, and I've kind of been struck by how hard things still are. It seems like what we really need is a more pythonic approach. One thing I've been seeing suggested a lot lately is that running jobs in separate processes, to make it easy to use the latest...
35
2855
by: Michel Sanner | last post by:
Hello, One of the greatest feature of Python in my opinion is the way the interpreter can be used to integrate a wide variety of software packages by dynamically linking them. This approach has been extremely successful for us so far but now I run into a license nightmare. Some the libraries we wrapped using SWIG are under GPL but the...
0
985
by: nimitsis | last post by:
hello I have a problem, which in C is simple to get through of it, but in python seems not so easy to me. I have 2 python threads. Each one do a different work. The first do a computation in a variable and the second send the value of the variable to an other processor, via MPI and receive a new one. The main problem is that the computation...
0
1155
by: Dudeja, Rajat | last post by:
Hi, I'm learning Python to write a GUI application using Tkinter & Tk. I've evaluated Eclipse and Pydev. With the help of Fabio Zadrozny I successfully installed Eclipse and PyDev. Thanks. Now, I'm learning Eclipse and PyDev. And my problem is that I don't have an understanding of how the code in
0
7912
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7839
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8202
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7959
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6614
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5390
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
1
2345
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1449
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1180
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.