Can we send and receive data to and from Port Using Python ?
Hi, I am new to this group. I have some question, it is listed below. In my application I should send some data to hardware and it will give response that response should log in one file. To do it first should send data to port next receive response from port (hardware) so... Queries: 1) Can we able to send data to serial port using python? If yes how? 2) Can we able to receive data from serial port using python? If yes how? 3) Is there any function like Register event call back, please explain? (Register event call back: registers a script to be called when an event occurs) 4) Is it possible parallel loops concept in python (In my application send data to port and receive data should be in one file and execute at same time)? If anyone knows answers please clarify and have any examples related to this please send it .if u need any information regarding questions please let me know. Thanks in advance. Regards, Sambasivareddy.S http://www.patni.com World-Wide Partnerships. World-Class Solutions. _ This e-mail message may contain proprietary, confidential or legally privileged information for the sole use of the person or entity to whom this message was originally addressed. Any review, e-transmission dissemination or other use of or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you have received this e-mail in error kindly delete this e-mail from your records. If it appears that this mail has been forwarded to you without proper authority, please notify us immediately at [EMAIL PROTECTED] and delete this mail. _ -- http://mail.python.org/mailman/listinfo/python-list
Re: Can we send and receive data to and from Port Using Python ?
sambasivareddy wrote: Hi, I am new to this group. I have some question, it is listed below. In my application I should send some data to hardware and it will give response that response should log in one file. To do it first should send data to port next receive response from port (hardware) so... __ _Queries:_ 1) Can we able to send data to serial port using python? If yes how? The usual mechanism is the pyserial module. Google is your friend. 2) Can we able to receive data from serial port using python? If yes how? See answer to 1) 3) Is there any function like Register event call back”, please explain? (Register event call back: registers a script to be called when an event occurs) I believe you need to implement the observer pattern. There have already been several successful implementations of this, and again Google should be capable of finding them. For example: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/131499 4) Is it possible parallel loops concept in python (In my application send data to port and receive data should be in one file and execute at same time)? Most Python implementations support threading, and there are a number of other asynchronous service techniques. There should be absolutely no problem. If anyone knows answers please clarify and have any examples related to this please send it .if u need any information regarding questions please let me know. Thanks in advance. regards Steve -- Steve Holden+1 571 484 6266 +1 800 494 3119 Holden Web LLC http://www.holdenweb.com/ -- http://mail.python.org/mailman/listinfo/python-list