title: How to make Python Configuration File from user input, and insert runs?
body: <p>I've got a bunch of Python webdriver runs that I've converted from Selenium IDE.  These runs have 1 or 2 settings that I would like to be able to change using a configuration file that would be created by running a script that collects user input that would set these 2 variables.</p>
  
  <p>Here is my attempt at using the <code>ConfigParser</code> module:</p>
  
  <pre><code>import ConfigParser
  
  file_path_input = raw_input("Enter path to 'webdriver' directory ex: '/home/user/': ")
  print "you entered", file_path_input
  
  url_input = raw_input("Enter url that the application will point to, ex: 172.31.13.56 or vtm55.example.com: ")
  print "you entered", url_input
  
  def createConfig(file_path_input):
  """
  Create a config file
  """
  config = ConfigParser.ConfigParser()
  config.add_section("application_settings")
  config.set("application_settings", "file_path_to_use", "file_path_input")
  config.set("application_settings", "url_to_use", "url_input")
  config.set("application_settings", "settings_info",
      "Your application directory is in %(file_path_to_use)s and your application url is %(url_to_use)s")
  
  with open(file_path_input, "wb") as config_file:
      config.write(config_file)
  </code></pre>
  
  <p>The <code>raw_input()</code> and <code>print()</code> lines work, but the configuration file doesn't appear to be generated at all. Once the file has been created, I'd like to be able to insert the variables <code>file_path_to_use</code> and <code>url_to_use</code> in my various Python webdriver runs.</p>