<p>The problem is simple:</p>

<p>Using bash, I want to add a directory to my PYTHONPATH for ease of script execution. Unfortunately, the directory I want to use has a : in it. So I try each of the following</p>

<pre><code>export PYTHONPATH=${PYTHONPATH}:/home/shane/mywebsite.com:3344/
export PYTHONPATH=${PYTHONPATH}:/home/shane/mywebsite.com\:3344/
export PYTHONPATH=${PYTHONPATH}:"/home/shane/mywebsite.com:3344/"
</code></pre>

<p>None of these work. Every time, the path is created as two separate directories on the path in python.
My question is, is it possible to do this for bash?
If so, what's the syntax required?</p>

There is only one you didn't try:
```
```
export PYTHONPATH=${PYTHONPATH}:"/home/shane/mywebsite.com\:3344/"
```
```
The problem is without the quotes, the escaping is interpreted directly, and converted into a literal ":" in the string.  But the ":" needs to be evaluated later.
```
```
$ echo "foo:" 
foo:
$ echo \:foo
:foo
$ echo ":foo"
:foo
$ echo "\:foo"
\:foo
```
```
I can't guarantee this will fix your python-path problem, but it will get the \ literal into the string.