Python Forum
Send raw string via socket with out any changes
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Send raw string via socket with out any changes
#18
good, version 3. so you started writing some parts before you realized the need to use bytes and the quick workaround is to convert strings to bytes. i've had a similar issue before and did the conversion like this:
  my_bytes = bytes([ord(x) for x in my_string])
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply


Messages In This Thread
RE: Send raw string via socket with out any changes - by Skaperen - Jul-30-2019, 08:04 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Send data BMP180 between client and server trought module socket smalhao 0 2,865 Jul-30-2018, 12:56 PM
Last Post: smalhao
  Simple send and recive string Server/Client Epilepsy 1 2,777 May-01-2018, 08:17 PM
Last Post: ThiefOfTime

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020