title: Code changes from Python 2.6 to 3.x
body: <p>I am trying to get <a href="http://pywbem.svn.sourceforge.net/" rel="nofollow">pywbem</a> working in Python 3.2 (it works fine in 2.6) but the build fails on this part of code in mof_compiler.py:</p>
  
  <pre><code>  File "pywbem-0.7.0\mof_compiler.py", line 1341
      print s
            ^
  SyntaxError: invalid syntax
  </code></pre>
  
  <p>It's a macro, defined like this:</p>
  
  <pre><code>def _print_logger(s):
      print s
  </code></pre>
  
  <p>I don't understand why this is invalid, please explain how to do the same in Python 3.2.</p>
  
  <p>Note: I have little or no experience with Python.</p>
  
  <p>PS: I have already done some small changes to the code for 3.2 like
  changing</p>
  
  <pre><code>except CIMError, ce:
  </code></pre>
  
  <p>to</p>
  
  <pre><code>except CIMError as ce:
  </code></pre>
  
  <p>based on Lennart Regebro's answer here are some other changes I found (placing them here since it may be useful for others).</p>
  
  <pre><code>exec "import %s as lextab" % tabfile -&gt; exec ("import %s as lextab" % tabfile)
  raise ValueError,"Expected a string" -&gt; raise ValueError("Expected a string")
  </code></pre>