title: 'net' is not recognized as an internal or external command, operable program or batch file in python
body: <p>I am trying to connect to a network drive,
  I have written below code.
  But I am fetching <code>'net' is not recognized as an internal or external command</code></p>
  
  <pre><code>import copy,random, unicodedata, re, os
  import subprocess, netrc
  
  password  = "MyPWD"
  domain_name = "MyDomain"
  user_name = "MyName"
  subprocess.call(r'net use m: /del', shell=True)
  os.system(r"NET USE m: \\fileshare\\Users\\Dir %s /USER:%s\%s" % (password, domain_name, user_name))
  </code></pre>