title: Python - check if a system is 32 or 64 bit to determine whether to run the function or not?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/1405913/how-do-i-determine-if-my-python-shell-is-executing-in-32bit-or-64bit-mode">How do I determine if my python shell is executing in 32bit or 64bit mode?</a>  </p>
  </blockquote>
  
  
  
  <p>I made a question earlier that never got replied to, but I have something more specific now so hopefully you can help.</p>
  
  <p>Basically the SendKeys library only appears to install on my 32 bit system of Windows...</p>
  
  <p>So I was wondering if there is a way of making it so this function I am going to write will only execute on a 32 bit system? I realise there is a platform.architecture() method to check the current system, but it returns the string "('64bit', 'WindowsPE')".</p>
  
  <p>I was wondering if there was a way to read the 64 bit part of this string to make this function work correctly.</p>
  
  <p>For example, pseudo code:</p>
  
  <pre><code>checker = platform.architecture()
  system = strip or read 64 bit from checker string somehow
  if system == 64 bit
  then warn system is 64 bit and won't run function
  else run function
  </code></pre>
  
  <p>Along the line of that. Unless there is a simpler way of checking it - maybe against the version of Python used (ie 32 or 64 bit)</p>
  
  <p>Hope I've grasped this correctly - I'm still rather new to programming. :)</p>