title: how to properly pass literal strings python code to be excuted using python -c
body: <p>I need some help figuring out how to execute this python code from python -c
  I am have trouble formatting python so that it will execute for another app in cmd
  I understand there maybe other ways to do what I am doing but I am limited by the final execution using cmd python -c so please keep this in mind.</p>
  
  <p>So I have some python code ie,  </p>
  
  <pre><code>import os
  import shutil
  
  myPath =r"C:\dingdongz"
  for root, dirs, files in os.walk(myPath):
      for file in files:
          os.remove(os.path(root, file))
      for dir in dirs:
          shutil.rmtree(os.path.join(root,dir))
  </code></pre>
  
  <p>But I am trying to excute it using the following method, python -c "print 'hotdogs'"</p>
  
  <p>So this what i have but no worky</p>
  
  <pre><code>cmdline = "\" import os, shutil \n for root, dirs, files in os.walk("+myPath+"):\n \t for file in files: \n \t \t os.remove(os.path.join(root, file)) \n \t for dir in dirs: \n \t\t shutil.rmtree(os.path.join(root, dir))" 
  
  Windows CMD
  python -c "+ cmdline +'"'
  </code></pre>