Re: Can we send and receive data to and from Port Using Python ?

Discussion in 'Python' started by Steve Holden, Apr 11, 2008.

  1. Steve Holden

    Steve Holden Guest

    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/
     
    Steve Holden, Apr 11, 2008
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. arti
    Replies:
    0
    Views:
    592
  2. Roger Middleton
    Replies:
    1
    Views:
    592
    red floyd
    Mar 25, 2005
  3. terry
    Replies:
    5
    Views:
    938
    Gabriel Genellina
    May 3, 2008
  4. Ying-CO
    Replies:
    0
    Views:
    845
    Ying-CO
    Jun 5, 2008
  5. Replies:
    1
    Views:
    668
    Toni Erdmann
    Mar 2, 2005
Loading...

Share This Page