How to open .bashrc in python
<p>I have a problem with opening the <code>.bashrc</code> file in python. I have written the following code:</p>

<pre><code>mydata = open ('/home/lpp/.bashrc', 'r')
</code></pre>

<p>and I get this:</p>

<pre><code>$ /usr/bin/python2.7 /home/lpp/lpp2016/Handin3.py
Process finished with exit code 0
</code></pre>

<p>Python does not open the file <code>.bashrc</code>. What did I do wrong? </p>

<pre><code>fp = open(os.path.join((os.path.expanduser('~'), '.bashrc'))
fp.read()
</code></pre>

<p>it is opening and reading all the content</p>

python python-2.7