Python argparse - arguments strip off when bash special character is passed as argument
<p>I writing CLI tool using argparse.</p>

<p>Below is my code snippet:</p>

<pre><code>parser.ArgumentParser()
parser.add_argument('--username')
parser.add_argument('--password')
args = parser.parse_args()
print(args.password)
</code></pre>

<p>I run the script on my Mac:</p>

<p><code>&gt;&gt;&gt; prog.py --username xyz --password abc$xyz</code></p>

<p>Output:</p>

<p><code>&gt;&gt;&gt; abc</code></p>

<p>I know it's bash shell that interprets '$xyz' as a bash variable and tries to substitute '$xyz'</p>

<p>Is there are way I can get around this without enclosing the password in quotes? </p>