title: TypeError: can't pickle CompiledFFI objects
body: <p>I am trying to get output from Telnet and SSH hosts for some commands and store them in a shelf. Since there are many commands, I am using multiprocessing.
  I have the following important methods:</p>
  
  <ol>
  <li><code>connectToHost</code>: Making a connection (SSH/ Telnet) using a method.</li>
  <li><code>ExecuteCommand</code>: executing the command and getting the output.</li>
  <li><code>main</code>: where I am iterating over all the commands and getting the output in a dictionary using <code>multiprocessing</code>. This method calls another method which merges the outputs from other processes.</li>
  </ol>
  
  <p>For Telnet, everything works fine but when it is an SSH connection, I the code is failing at the <code>process.start()</code> and I am getting following error.</p>
  
  <blockquote>
    <p>TypeError: can't pickle CompiledFFI objects</p>
  </blockquote>
  
  <p>Why is it not working for SSH even when I am calling the same methods? how to fix this?</p>