title: Is it possible to use Windows-style command line options with Python?
body: <p>Is it possible to make a Python script accept command-line options that are Windows-styled (namely, prefixed with &quot;/&quot; instead of &quot;-&quot;/&quot;--&quot; and using &quot;:&quot; to specify values of options instead of &quot;=&quot;)?</p>
  <p>So far, I have used argparse and managed to use &quot;/&quot; as a prefix, but I could not make it use &quot;:&quot; as a separator.</p>
  <pre class="lang-python prettyprint-override"><code>parser = argparse.ArgumentParser(prog='PROG', prefix_chars='/')
  parser.add_argument('/f')
  parser.add_argument('/bar')
  
  #This works with =
  print(parser.parse_args('/f X /bar=Y'.split())) #Namespace(bar='Y', f='X')
  #Does not work with :
  print(parser.parse_args('/f:X /bar:Y'.split())) #blows up
  </code></pre>