473,327 Members | 2,069 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

python server

Hello

I`m writing a program (server in future) in python.
I would like to write it in such a way that I will be able to write gui
in any language and connect to my python program and use functionality
included with it.
are there any libraries that I could use?

I dont know if i wrote it understandably but maybe picture will explain
it:

|------------|
| python |
| | <- module in python -> <- connection ("???") -> <-gui in
any language (java, c++, python, etc).
| server |
|-----------|
what could I use as "???"? http? mqseries? webservices? what are the
possibilites?

thx for answers
linuxfan

Nov 7 '05 #1
4 1856
On 7 Nov 2005 10:22:18 -0800, linuxpld <li******@gazeta.pl> wrote:
Hello

I`m writing a program (server in future) in python.
I would like to write it in such a way that I will be able to write gui
in any language and connect to my python program and use functionality
included with it.
are there any libraries that I could use?
Lots...Perhaps you should start off in understanding your problem by
learning about sockets:
http://www.amk.ca/python/howto/sockets/

Sockets are a generalized method for passing data between programs on
the same or different computers.

I dont know if i wrote it understandably but maybe picture will explain
it:

|------------|
| python |
| | <- module in python -> <- connection ("???") -> <-gui in
any language (java, c++, python, etc).
| server |
|-----------|
what could I use as "???"? http? mqseries? webservices? what are the
possibilites?


http, webservices, xmlrpc, corba, people to type in messages between
programs, carrier pigeons, and sockets are all possibilities. I'm
gonna recommend that you learn sockets, because they're a general
solution to this problem, and many methods of inter-program
communication are based on sockets, but I don't know the specifics of
the program you're designing.

How tightly will the client and server interact? In what environment
(ie over the internet, over a corporate LAN, on the same computer, on
Internet2)? Is there any framework in existance, or is this program
being written from scratch?

Peace
Bill Mill
bill.mill at gmail.com
Nov 7 '05 #2
linuxpld wrote:
I`m writing a program (server in future) in python.
I would like to write it in such a way that I will be able to write gui
in any language and connect to my python program and use functionality
included with it.
are there any libraries that I could use?


Thee are many solutions. An XML-RPC server springs to mind as a
solution. There are several Python XML-RPC servers, and clients
for a wide range of languages, see:
http://xmlrpc.scripting.com/director...mplementations

Plain sockets can work of course, but that's fairly low
level: You'll need to device a protocol etc.

For more possible solutions, see
http://www.thinkware.se/cgi-bin/thin...OtherLanguages
Nov 8 '05 #3

"linuxpld" <li******@gazeta.pl> wrote in message
news:11**********************@g44g2000cwa.googlegr oups.com...
Hello

I`m writing a program (server in future) in python.
I would like to write it in such a way that I will be able to write gui
in any language and connect to my python program and use functionality
included with it.
are there any libraries that I could use?
That depends on what you want and what other "goodies" you want.

I liked "Python Web Modules" http://www.pythonweb.org/ a lot, mostly because
I needed a decent Database interface and because you do not have to "buy"
the entire framework like you do with f.ex. CORBA if you only want to use
some of it. Everything runs a browser these dayz.

Another possibility is to write a command-line interpreter that takes
commands from a socket and returns results. All ASCII of course. ASCII is
easy to debug.

This is very generic, robust and easy to write test scripts for. The
disadvantage is that you need a parser in the GUI and one in the
Application. The huge advantage is that you completely separate the
internals of the two programs from each other.

Most client-server UNIX/Linux applications are written this way; i.e. this
programming method survives in the wild because it is stable and it works.
The RPC frameworks tend to run up on a wild hype-cycle before being
generally left to maintenance programmers to sort out.

Consider a "Mailbox" system, where packages of work is send to a server
process and processed results are shipped back to the client process. The
trick is to keep all state inside the "work packages" so the servers do not
need to track anything. "MAKE" is a file-based implementation of this.
OTOH:

For Python <-> Python situations, the "Python Remote Objects", PYRO is not
bad at all. And it does have an Event mechanism, which can be used as a
"Mailbox" service. For reliable "shared memory" tasks ZOPE is good or maybe
SPREAD.

CORBA is overkill for everything, IMO ;-)

I dont know if i wrote it understandably but maybe picture will explain
it:

|------------|
| python |
| | <- module in python -> <- connection ("???") -> <-gui in
any language (java, c++, python, etc).
| server |
|-----------|
what could I use as "???"? http? mqseries? webservices? what are the
possibilites?

thx for answers
linuxfan

Nov 9 '05 #4

"Magnus Lycka" <ly***@carmen.se> wrote in message
news:dk**********@wake.carmen.se...
Thee are many solutions. An XML-RPC server springs to mind as a
solution. There are several Python XML-RPC servers

......

Good Idea. Seems that those particular batteries are included with Python
2.2 and up:

OP: See help on: "SimpleXMLRPCServer" and "xmlrpclib"
Nov 9 '05 #5

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

Similar topics

2
by: DeepBleu | last post by:
When one is using an HTML form via a web broswer, the user submits the form contents and these are passed to a CGI Python script on the web server. I need to write a client script that connects to...
19
by: Jane Austine | last post by:
As far as I know python's threading module models after Java's. However, I can't find something equivalent to Java's interrupt and isInterrupted methods, along with InterruptedException....
0
by: Phillip J. Eby | last post by:
PEP: 333 Title: Python Web Server Gateway Interface v1.0 Version: $Revision: 1.1 $ Last-Modified: $Date: 2004/08/27 17:30:09 $ Author: Phillip J. Eby <pje at telecommunity.com> Discussions-To:...
10
by: Andrew Dalke | last post by:
Is there an author index for the new version of the Python cookbook? As a contributor I got my comp version delivered today and my ego wanted some gratification. I couldn't find my entries. ...
47
by: Kenneth McDonald | last post by:
Is there any emerging consensus on the "best" UI for toolkit. Tk never quite made it but from what I can see, both qt and wxWin are both doing fairly well in general. I'm already aware of the...
13
by: John Salerno | last post by:
I'm hoping someone can give me the basics for how to do very simple things with Python scripts from within my HTML. For example, I know that I can do this in PHP: <h1>Here is a header</h1>...
28
by: H J van Rooyen | last post by:
Hi, I want to write a small system that is transaction based. I want to split the GUI front end data entry away from the file handling and record keeping. Now it seems almost trivially easy...
15
by: John Nagle | last post by:
I've been installing Python and its supporting packages on a dedicated server with Fedora Core 6 for about a day now. This is a standard dedicated rackmount server in a colocation facility,...
5
by: walterbyrd | last post by:
I don't know much php either, but running a php app seems straight forward enough. Python seems to always use some sort of development environment vs production environment scheme. For...
0
by: GeicoGecko | last post by:
Hey guys, There was no python section in the "Web Development" forum so I'm hoping I can pose my question in here. Our system We currently have a python webserver using SimpleHTTPServer,...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.