comparing outputs from command.getoutput(cmd)
<p>I have the following code that is working apart from one problem.  Im trying to compare the two outputs from commands.getoutput(cmd) but im getting syntax errors.  I understand that this is probably inherently wrong, but could someone point what im doing wrong</p>

<pre><code>def DiffGenerator():

  try: sys.argv[1]
  except: print "No Directory to scan defined\n"

  try: sys.argv[2]
  except: print "No delay time defined\n"

  ScanDirectory = sys.argv[1]
  if not os.path.exists(ScanDirectory):
    print "Scan Directory does not exist :" + ScanDirectory 

  cmd = "ls -l " + ScanDirectory

  try:
    DiffFileA = commands.getoutput(cmd)
    print "Printing DiffFileA" + DiffFileA
    time.sleep(1)
    DiffFileB = commands.getoutput(cmd)
    if operator.ne(DiffFileA, DiffFileB)
      print "New File placed within " + ScanDirectory
  except:
    print "BLAH"
</code></pre>
