title: Import functions from Python script in remote directory via a custom module
body: <p>So this problem is a bit convoluted, but I will try to explain.  I have written a script <code>script.py</code> that is located in <code>/my/directory/script.py</code>.  This contains many helpful functions that I would like to make available to users of Python on this server.  Normally, I would package it as a module and move it to the <code>libs</code> folder and access it this way, but unfortunately at my company I am unable to edit files when they are placed there as I will not have root access.</p>
  
  <p>What I have been doing to access this script from either the shell or other scripts is to write:</p>
  
  <pre><code>import sys
  sys.path.append('/my/directory')
  from script import *
  </code></pre>
  
  <p>This works, but ideally I would like it to just be:</p>
  
  <pre><code>import script
  </code></pre>
  
  <p>What I was thinking was making a folder in <code>libs</code> with <code>__init__.py</code> that contains the import sys code above, and simply referencing this script with an import.  But when I do this I get an import error that the script is unable to import from my referenced script.</p>
  
  <p>Is there a better way to do this? </p>
  
  <p><strong>Basically I want people to be able to access my module as if it is installed normally by importing a script that imports my functions.</strong></p>