Python / closing is not defined
<p>I try to follow the <a href="https://pypi.python.org/pypi/scpclient" rel="nofollow">instructions of the scpclient</a>.</p>

<p>I wrote the following code:</p>

<pre><code>import paramiko
client = paramiko.SSHClient()
client.load_system_host_keys()
client.set_missing_host_key_policy(paramiko.WarningPolicy())
client.connect("my_ip", username="root", password="password")
stdin, stdout, stderr = client.exec_command('display version')
with closing(Write(client.get_transport(), '.')) as scp:
    scp.send_file("/tmp/myfile", remote_path="/tmp")
client.close()
</code></pre>

<p>But I got the following error:</p>

<pre><code>Traceback (most recent call last):
  File "ssh.py", line 11, in &lt;module&gt;
    with closing(Write(client.get_transport(), '.')) as scp:
NameError: name 'closing' is not defined
</code></pre>

<p>What can be the reason?</p>