title: Execute a Windows path with spaces in Python
body: <p>I am trying to build a program that mimics the 'run' feature of Windows in a Windows environment. Now I know that sounds a bit silly, but we are on 'limited' computers, and the cmd is completely locked so we don't have any choice but to build our own program files for our needs.</p>
  
  <p>Specifically, what I am trying to do is a little utility that will ask for the drive, subject, and course number, and based on that open the full path.</p>
  
  <blockquote>
    <p>i.e. W Python 47 -> w://courses/subjects/python/classes/47 - Arrays &amp; Pointers</p>
  </blockquote>
  
  <p>I have done most of the work in Python and reached the last stage where I need to get the full path based only on the number with the code being something like:</p>
  
  <pre><code>os.system(start 'drive + '://courses/subjects/' + subject + '/classes/' + class')
  </code></pre>
  
  <p>Where drive, subject, and class are variables that hold the data of the current path.</p>
  
  <p>The problem is that when there is a space in the file path, Windows can't find it, and produces an error.</p>
  
  <p>The simple solution would be to put double quotes, but for some reason double quotes on the start command is considered as a cmd command which is blocked..</p>
  
  <p>Any ideas on a workaround, or maybe Python is not the way to go, and so any ideas on a different language, that would be easier. (I have basic knowledge in C++, Python, Java)</p>
  
  <p>p.s. This is not the exact code, that I am using, I will post that tomorrow.</p>