title: Using python can sockets on embedded linux, bind misbehaves
body: <p>I'm trying to interface to CAN drivers using python 3.4 running on embedded linux.
  Theoretically there's a nice socketcan library available from python 3.3
  but import can fails. </p>
  
  <p>root@unit-901-100-sn003:~/francis# python3 
  Python 3.4.3 (default, Oct 14 2015, 21:23:51) 
      import can
  ImportError: No module named 'can'</p>
  
  <p>Back to basics. Actually I was working on this before somebody pointed out 
      #!/usr/bin/env python3</p>
  
  <pre><code>import socket;
  
  can_device = "can0";
  
  sock_instance = socket.socket(socket.PF_CAN, socket.SOCK_RAW, socket.CAN_RAW);
  can_index = socket.if_nametoindex(can_device);
  addr = (socket.AF_CAN, can_index); 
  sock_instance.bind(addr);
  </code></pre>
  
  <p>root@unit-901-100-sn003:~/francis# ./sockio.py 
  Traceback (most recent call last):
    File "./sockio.py", line 10, in 
      sock_instance.bind((can_device, can_index));
  TypeError: function takes exactly 1 argument (2 given)</p>
  
  <p>This program fails as above.
  I'm obviously passing a single argument tuple or I've gone inanse?</p>
  
  <p>If I just created a simple socket</p>
  
  <pre><code>si = socket.socket();
  si.bind(('0.0.0.0', 8000));
  </code></pre>
  
  <p>It executes so bind can recongise a tuple.</p>