title: Python - socket CAN connection
body: <p>I am using python to receive data from Linux socket CAN.
  ID is 0x1f7d8401, whereas the ID of the data I received was 401, showing only the last three digits.</p>
  <p>What should I modify to get the whole ID value except 0x?
  Attached is the source code.</p>
  <pre><code>import can
  import time
  import os
  
  
  print('\n\rCAN Rx test')
  print('Bring up CAN0....')
  os.system(&quot;sudo /sbin/ip link set can0 up type can bitrate 500000&quot;)
  time.sleep(0.1) 
  
  try:
      bus = can.interface.Bus(channel='can0', bustype='socketcan_native')
  except OSError:
      print('Cannot find PiCAN board.')
      exit()
      
  print('Ready')
  
  try:
      while True:
          message = bus.recv()    # Wait until a message is received.
          
          c = '{0:f} {1:x} {2:x} '.format(message.timestamp, message.arbitration_id, message.dlc)
          s=''
          for i in range(message.dlc ):
              s +=  '{0:x} '.format(message.data[i])
              
          print(' {}'.format(c+s))
      
      
  except KeyboardInterrupt:
      #Catch keyboard interrupt
      os.system(&quot;sudo /sbin/ip link set can0 down&quot;)
      print('\n\rKeyboard interrtupt')
  </code></pre>