Python import from a different directory using "~" symbol
<p>Under a linux structure, i've noticed that the following works:</p>

<pre><code>import sys
sys.path.append("/home/username/fullpathname/")
import my_module
</code></pre>

<p>however the following does not</p>

<pre><code>import sys
sys.path.append("~/fullpathname")
import my_module
</code></pre>

<p>is there a way to use the "~" operator? I don't understand why python wants the full directory. Thank you!</p>
