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
#16
data in the source code needs to be put in quotes. use a type of quote different than any quotes that are part of the data. make the string be bytes type by putting the b just before the starting quote. do not put r in front because that kind of raw will make your \x stuff not work.

for what you are doing you need binary. that is what the bytes type is. your use of the term "raw" for this is not the same meaning as python's meaning of "raw". you do not need python's raw. so don't even think of trying to use it. just use bytes. and bytes literal looks like b'this is bytes'.

are you using python version 3? you need to be. bytes are not real bytes in version 2.
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-27-2019, 12:53 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Send data BMP180 between client and server trought module socket smalhao 0 2,868 Jul-30-2018, 12:56 PM
Last Post: smalhao
  Simple send and recive string Server/Client Epilepsy 1 2,781 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