title: Get script absapth executed by Django shell
body: <p>I have a script called myscript.py and I try to print the file path in it.</p>
  
  <pre><code>print(os.path.abspath(__file__))
  </code></pre>
  
  <p>I executed the script using django shell</p>
  
  <pre><code>./manage.py shell &lt; myscript.py
  </code></pre>
  
  <p>However, I could not get the script file path but the shell.py file path. what I get is something like:</p>
  
  <p>...lib/python3.6/site-packages/django/core/management/commands/shell.py</p>
  
  <p>Why abspath(<strong>file</strong>) does not show myscript.py path? is there a way to print out the path of myscript.py? Thanks</p>