Re: [Tutor] How to write server which listens to specific port
ShivKumar Anand shiv_...@hotmail.com wrote My problem is I dont know how to send/receive a file using socket. How to get the filename specifically. Could you use ftp? There is an ftp module. You need to work out what you want to do over this connection and choose the appropriate protocol. Then you can use a higher level module if one is available. Raw sockets should only be needed if you are doing bespoke communications between processes. -- Alan Gauld Author of the Learn to Program web site http://www.alan-g.me.uk/ ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] How to write server which listens to specific port
On Mon, Apr 13, 2009 at 10:59 PM, ShivKumar Anand shiv_...@hotmail.com wrote: Thanks Kent for this valuable information. My problem is I dont know how to send/receive a file using socket. How to get the filename specifically. Where does the file name come from? Do you ask the user? Is it requested by the remote client? There is an introduction to socket programming here: http://www.amk.ca/python/howto/sockets/ Did you look at the links I posted? The NetEpi project seems to have a complete implementation of an MLLP listener. It uses another project called halftwist that I can't find but it may still be helpful. The Mirth link also looks promising. This page seems to have a good description of the MLLP protocol: http://www.hl7.org/v3ballot/html/infrastructure/transport/transport-mllp.htm I don't know your experience level, but if you can't understand the above MLLP protocol document you are probably in over your head. Kent ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] How to write server which listens to specific port
Thanks Kent for this valuable information. My problem is I dont know how to send/receive a file using socket. How to get the filename specifically. Thanks Shiv Date: Fri, 10 Apr 2009 06:56:34 -0400 Subject: Re: [Tutor] How to write server which listens to specific port From: ken...@tds.net To: shiv_...@hotmail.com CC: tutor@python.org On Fri, Apr 10, 2009 at 4:59 AM, ShivKumar Anand shiv_...@hotmail.com wrote: I have to implement HL7 in my existing application. so, I have to send/receive messages which are in a text file (not implementing v3.0, in which the messages are in xml format) Googling python hl7 finds a couple of hints for the server and a message parser: http://mail.python.org/pipermail/python-list/2007-March/600733.html http://pypi.python.org/pypi/hl7/0.1.0 How can we configure in TurboGears to send and receive files? The protocol I want to use is TCP/IP v4 I don't think you can use TurboGears / CherryPy to create a server that is not HTTP-based. For that look at socketserver or asyncore/asynchat in the std lib or Twisted. Kent _ How fun is this? IMing with Windows Live Messenger just got better. http://www.microsoft.com/india/windows/windowslive/messenger.aspx___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] How to write server which listens to specific port
On Fri, Apr 10, 2009 at 4:59 AM, ShivKumar Anand shiv_...@hotmail.com wrote: I have to implement HL7 in my existing application. so, I have to send/receive messages which are in a text file (not implementing v3.0, in which the messages are in xml format) Googling python hl7 finds a couple of hints for the server and a message parser: http://mail.python.org/pipermail/python-list/2007-March/600733.html http://pypi.python.org/pypi/hl7/0.1.0 How can we configure in TurboGears to send and receive files? The protocol I want to use is TCP/IP v4 I don't think you can use TurboGears / CherryPy to create a server that is not HTTP-based. For that look at socketserver or asyncore/asynchat in the std lib or Twisted. Kent ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
[Tutor] How to write server which listens to specific port
Dear All, Greetings I have developed an application in Python 2.4.2, TurboGears 1.0, cherryPy 2.3.1. Now, I have to develop a server, which listens to a specific port (104) and save the file to a specific location (/tmp/myDir) on RHEL 4/5. Guide me how to do that. what all packages I have to use. Thanks in anticipation. Shiv _ The new Windows Live Messenger. You don’t want to miss this. http://www.microsoft.com/india/windows/windowslive/messenger.aspx___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor