title: Input variable from command line in Python
body: <p>What I want to do is very simple but I can't figure out a good and not too complex solution for this. Basically I want to define some global variables that will be used for example as a folder name </p>
  
  <pre><code>global folder = "C:\\TEMP\\" + foldername
  </code></pre>
  
  <p>And what I want is to set the foldername value as input when running the script, something like:</p>
  
  <pre><code>python myscript.py --folder somebeautifulfoldername
  </code></pre>
  
  <p>so when running my script, the folder will become C:\TEMP\somebeautifulfoldername</p>