title: Python copy and paste path file from Windows Explorer into variable
body: <p>I developed a software in Python3.4 which has as input a config file with a set of variables and some of them are paths.</p>
  
  <p>I have a problem with the separator in the file path name.
  I know I can put a "r" in front of the string or use the double backslash or the slash so to have a raw string, but because this software will be used by other users and the average one is just a "copy and paste" guy, I don't want they manipulate the file name.</p>
  
  <p>So the users have just to copy from the Windows Explorer the file path and paste into the config file, something like:</p>
  
  <pre><code>path_variable = "C:\Users\home\room\table.txt"
  </code></pre>
  
  <p>and I want to write a function that modify it so can be used.</p>
  
  <p>How can I do it? If I leave the string in this way I obtain an unicode error because of \U...</p>
  
  <p>Thanks a lot,</p>
  
  <p>Ciccio</p>
  
  <p><strong>Update</strong></p>
  
  <p>The config file is not a python file but just a .txt file within the variables and their values:</p>
  
  <pre><code>var_name = var_val
  path_variable = "C:\Users\home\room\table.txt"
  height = 20
  plot_write_variable = ["y", "n"]
  </code></pre>
  
  <p>This is just a temporary solution until I finalize the GUI. This file must be really easy to understand and the software has to be used by people don't have any knowledge of Python or programming. The final user has just to change the variables value and click on the executable file to run the program and nothing else. For this reason I want to avoid as much as possible the use of any python command.</p>
  
  <p>To read the config file I use this function:</p>
  
  <pre><code>import imp
  def read_inputFile(path):
      file = open(path)
      variables = imp.load_source('data', '', file)
      file.close()
      return variables
  </code></pre>