title: Transmit pickle bytes over SSH
body: <p>I am trying to launch a python script remotely on a server from another python script on my computer. The goal is to transmit over SSH some data which are in a class (for instance, data is the string I want to transmit. Sure it has no sense to use pickle for a string, it is juste for the example).</p>
  
  <p>I would like something like that :</p>
  
  <p>Script (on computer): maCo is a SSH connexion.</p>
  
  <pre><code>import pickle
  data = 'é&amp;'
  data_bytes = pickle.dumps(data)
  maCo.sendCmd(['python3', 'serverScript.py', '-ma', data_bytes])
  </code></pre>
  
  <p>Script (on server)</p>
  
  <pre><code>import argparse, pickle
  parser = argparse.ArgumentParser()
  parser.add_argument("-ma", "--myarg", help="Arg", type=bytes)
  args = parser.parse_args()
  data = pickle.loads(args.myarg)
  </code></pre>
  
  <p>I try to convert bytes to string but that was not a success.
  Thanks for your help</p>