title: TypeError: object of type 'bool' has no len() in sys.argv length check
body: <p>What is the reason for the error  </p>
  
  <pre><code>TypeError: object of type 'bool' has no len()  
  </code></pre>
  
  <p>Should i import something in my python program? I am using len(sys.argv) in if condition to check for the number of command line arguments, which are float values(like 1.2 and 2.4, etc). Any thoughts? This is in python2.6. This is how i am running the program  </p>
  
  <pre><code>python BeaconsAnalysis.py 2.0 3.0  
  </code></pre>
  
  <p>And some portion of my code where i am checking this is,  </p>
  
  <pre><code>with open("luawrite", "r") as f:
      if(len(sys.argv == 2)):
              for line in f:
                      t1 = sys.argv[1]
                      t2 = sys.argv[2]
                      hashes = line.split()
                      t = hashes[0] 
                      ...........(goes on)
  </code></pre>