title: Is the output of scapy.sprintf a raw string?why the length is wrong?
body: <p>I want to analyze TCP packets by scapy. And I use pkt.sprintf('%Raw.load%') to extract tcp data. But the output string has something wrong with length. but the '\' is  deemed to be a str instead of a Escaped character.so '\x11' is considered as 4 different strings instead of a ASCII character.</p>
  
  <p>Here are my codes:</p>
  
  <pre><code>from scapy.all import *
  def findTCPdata(pkt):
      raw = pkt.sprintf("%Raw.load%")
      print raw
      print 'length of TCP data: '+ str(len(raw))
  def main():
      pkts = rdpcap('XXX.pcap')
      for pkt in pkts:
          findTCPdata(pkt)
  if __name__ == '__main__':
      main()
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/5cAsp.jpg" rel="nofollow noreferrer">enter image description here</a></p>
  
  <p>The length of each tcp data should be 17 instead of the value in screen(53,52,46,52).
  4 tcp data are:</p>
  
  <pre><code>'U\x11\x04\x92\x02\x03\x1e\x03@\x03\xf8q=e\xcb\x15\r'
  'U\x11\x04\x92\x02\x03.\x03@\x03\xf8q=e\xcb\xb8\x05'
  'U\x11\x04\x92\x02\x03X\x03@\x03\xf8q=e\xcbiO'
  'U\x11\x04\x92\x02\x03n\x03@\x03\xf8q=e\xcb\xdb\xe3'
  </code></pre>
  
  <p>Please help me solve the problem.Thank you!</p>