title: Taking String arguments for a function without quotes
body: <p>I've got a function meant to download a file from a URL and write it to a disk, along with imposing a particular file extension. At present, it looks something like this:</p>
  
  <pre><code>import requests
  import os
  
  def getpml(url,filename):
      psc = requests.get(url)
      outfile = os.path.join(os.getcwd(),filename+'.pml')
      f = open(outfile,'w')
      f.write(psc.content)
      f.close()
      try:
          with open(outfile) as f:
              print "File Successfully Written"
      except IOError as e:
          print "I/O Error, File Not Written"
      return
  </code></pre>
  
  <p>When I try something like</p>
  
  <p><code>getpml('http://www.mysite.com/data.txt','download')</code> I get the appropriate file sitting in the current working directory, download.pml. But when I feed the function the same arguments without the ' symbol, Python says something to the effect of "NameError: name 'download' is not defined" (the URL produces a syntax error). This even occurs if, within the function itself, I use <code>str(filename)</code> or things like that.</p>
  
  <p>I'd prefer not to have to input the arguments of the function in with quote characters - it just makes entering URLs and the like slightly more difficult. Any ideas? I presume there is a simple way to do this, but my Python skills are spotty.</p>