title: python version of C unsigned char
body: <p>I need help with a python version for this C code:</p>
  
  <pre><code>#define HostBusy_high   0x02
  #define control_register    0x37a
  
  Out32 (control_register,(unsigned char)(Inp32(control_register) | HostBusy_high));
  </code></pre>
  
  <p>the Out32 and Inp32 are functions located in the inpout32.dll used to interface parallel ports. These functions take hex values as their parameters. I tried to code in python to get the desired value but that is not what I am getting. See python version below:</p>
  
  <pre><code>from ctypes import windll
  
  #parallel port instance
  p_port = windll.inpout32
  HostBusy_high = 0x02
  control_register = 0x37a
  
  write_data = write(p_port(Inp32(control_register) | HostBusy_high))
   Out32 (control_register,write_data))
  </code></pre>
  
  <p>With the code above i do not seem to get the value I want. I suspect it is the unsigned value. </p>
  
  <p>Thanks</p>