Eric,

Thanks for writing.  As you may have predicted, It turns out the
problem was that I needed to append both \r and \n to the end of the
string I'm sending to emcrsh via the socket.  When I wrote my question
I was only using \n.  I found that  \r is enough in some situations,
but \r\n appears to do the trick for all cases.

Thanks for the tip re threads...I think you're right that I'll need to
add that in.

fg

On Fri, May 21, 2010 at 8:00 PM, Eric H. Johnson
<[email protected]> wrote:
>
> Can you provide a code snippet of what you are trying to do? I have just a
> cursory familiarity with python, but it should be as simple as
> s = self.file.readline()
> because all emcrsh commands are in plain text and terminated with a CR LF.
> It does assume that you have done the socket initialization properly of
> course.
>
> You would typically want to fork the readline function so that it will block
> until receiving a response, without blocking the main thread.
>
> HTH,
> Eric
>
>
> i've been trying to get a simple client socket in python connected to
> emcrsh on port 5007.  i can connect fine and appear to be able to send
> fine (python says it was sent), but i can't receive anything.  the
> client code just hangs waiting to get data.  yet if i telnet in
> manually and send the same string my client sends (e.g. HELLO EMC 1
> 1), i get an acknowledgment back from emcrsh (HELLO ACK EMCNETSRVR
> 1.1).
>
> am i missing something?
>
> thx!
>
>
> ------------------------------------------------------------------------------
>
> _______________________________________________
> Emc-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/emc-users
>

------------------------------------------------------------------------------

_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to