Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 855587
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T08:05:57+00:00 2026-05-15T08:05:57+00:00

This is strange enough I’m not sure how to search for an answer. I

  • 0

This is strange enough I’m not sure how to search for an answer. I have a program in Python that communicates via TCP/IP sockets to a telnet-based server. If I telnet in manually and type commands like this:

SET MDI G0 X0 Y0

the server will spit back a line like this:

SET MDI ACK

Pretty standard stuff. Here’s the weird part. If, in my code, I precede my printing of each of these lines with some text, the returned line erases what I’m trying to print before it. So for example, if I write the code so it should look like this:

SENT: SET MDI G0 X0 Y0
READ: SET MDI ACK

What I get instead is:

SENT: SET MDI G0 X0 Y0
SET MDI ACK

Now, if I make the “READ: ” text a bit longer, I can get a better idea of what’s happening. Let’s say I change READ: to 12345678901234567890, so that it should read as:

12345678901234567890: SET MDI ACK

What I get instead is:

SET MDI ACK234567890:

So it seems like whatever text I’m getting back from the server is somehow deleting what I’m trying to precede it with. I tried saving all of my saved lines in a list, and then printing them out at the end, but it does exactly the same thing.

Any ideas on what’s going on, or even on how to debug this? Is there a way to get Python to show me any hidden chars in a string, for example?

thx!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T08:05:58+00:00Added an answer on May 15, 2026 at 8:05 am

    You probably have a stray carriage return without a newline. Try using raw strings in Python instead to see what’s up.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My apologies if this is something obvious that I have missed - strange enough
This is a strange problem but it happens enough that I wanted to ask.
So this is a really strange problem. I have a Java app that acts
I have this strange error, When I call $element_attrs = $element -> attributes(); I
i have this strange problem with the PHP function CTYPE_ALNUM if i do: PHP:
Starting from Android 3.2 I have this strange problem. It's very easy to reproduce:
I met strange difficulty developing one project. I dont have enough experience with classes
I have a very strange bug in a shipping iPad/iPhone app that I can't
I have a C# dll exposed to vb6 via com-interop. This is all working,
I imagine that this is a simple question, but I'm getting some strange results

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.