title: tempfile syntax in python 2.4.3
body: <p>I have the following code which runs perfectly on Python 2.6.6:</p>
  
  <pre><code>import tempfile
  with tempfile.NamedTemporaryFile() as scriptfile:
          scriptfile.write(&lt;variablename&gt;)
          scriptfile.flush()
          subprocess.call(['/bin/bash', scriptfile.name])
  </code></pre>
  
  <p>However, when I try to run it on Python 2.4.3, I get the following error:</p>
  
  <pre><code>File "&lt;stdin&gt;", line 2
      with tempfile.NamedTemporaryFile() as scriptfile
                  ^
  SyntaxError: invalid syntax
  </code></pre>
  
  <p>Is there a change in syntax in Python 2.4.3?</p>