title: Access Object send over self-made TFTP in python
body: <p>I'm trying to create a TFTP in python over a existing UDP i have. In my server.py.</p>
  
  <p>As of now I'm able to send requests to read (RRQ) and write (WRQ) to the server. However, then a Packet object (Created object to be sent over to the server) reaches the server, I'm unable to access it.</p>
  
  <p>In server.py :</p>
  
  <pre><code>Packet =  (server_from_client.recv())
  print Packet
  print id(Packet)
  print Packet.opCode
  </code></pre>
  
  <p>This produces this output :</p>
  
  <pre><code>('127.0.0.1', 53909)
  recv done
  &lt;Packet.Packet object at 0x1e89f50&gt;
  
  
  42518000
  Traceback (most recent call last):
  File "servertest.py", line 16, in &lt;module&gt;
  print Packet.opCode
  AttributeError: 'str' object has no attribute 'opCode'
  </code></pre>
  
  <p>Why does it first tell me that it's a Packet.Packet object (which does have an opCode) and then say it's a 'str' object with no opCode ????</p>
  
  <p>Any help will be appreciated.</p>