title: Send Rust variable to Python?
body: <p>I am building a Rust program in which the user types in a command, and then the program reads the command and responds accordingly. One of these commands is to download a file from a set site. </p>
  
  <p>I have a .py file with the following code that I made a while ago that downloads files from a set site:</p>
  
  <pre class="lang-py prettyprint-override"><code>import urllib
  import urllib2
  import requests
  
  url = 'http://www.blog.pythonlibrary.org/wpcontent/uploads/2012/06/wxDbViewer.zip'
  
  print "downloading with urllib"
  urllib.urlretrieve(url, "code.zip")
  
  print "downloading with urllib2"
  f = urllib2.urlopen(url)
  data = f.read()
  with open("code2.zip", "wb") as code:
  code.write(data)
  
  print "downloading with requests"
  r = requests.get(url)
  with open("code3.zip", "wb") as code:
  code.write(r.content)
  </code></pre>
  
  <p>The URLs in the code are not ones that I will be using; they are examples.</p>
  
  <p>If the Rust program sets the site it needs to go to as a variable, is there a way that I could send the variable to my Python program? I know you can send Python to Rust:</p>
  
  <p><a href="https://stackoverflow.com/questions/31074994/passing-a-list-of-strings-from-python-to-rust">Passing a list of strings from Python to Rust</a></p>
  
  <p><a href="http://www.joesacher.com/blog/2017/08/24/ptr-types/" rel="nofollow noreferrer">http://www.joesacher.com/blog/2017/08/24/ptr-types/</a></p>
  
  <p>Is there a way to do this in the other direction? </p>