How do I install Python module given as .py file?
<p>I do realize this is a noobish question, but I've been trying for an hour and I can't get it right.</p>

<p>So, I have a Python script which I'd like to modify a bit and play around with as a Python beginner. However, at the very beginning of the script, there's this:</p>

<pre><code>from priodict import priority_dict
</code></pre>

<p>Now, I have a file named <code>priodict.py</code> that came with the script. But how do I make it available to the script so it can be included like that?</p>

<p>The Python manual has pages and pages on installing modules, but they all seem to refer to "packages" which are to be placed in certain directories etc. What do I do when I have just the .py file?</p>

<p>I know there is probably a banale one-sentence response to this, but I'm getting frustrated and I'm short on time so I decided to take the easy way out and ask Stack overflow about it.</p>

<p>It seems that, if I don't have the priodict.py file, I get this error:</p>

<pre><code>Traceback (most recent call last):
  File "C:\Python27\scripts\dijksta.py", line 192, in &lt;module&gt;
    main()
  File "C:\Python27\scripts\dijksta.py", line 185, in main
    D, _ = dijkstra(G, 1, v)
  File "C:\Python27\scripts\dijksta.py", line 139, in dijkstra
    Q = priority_dict() # est.dist. of non-final vert.
NameError: global name 'priority_dict' is not defined
</code></pre>

<p>If I place the file in the same directory as my script, I get this error:</p>

<pre><code>Traceback (most recent call last):
  File "C:\Python27\scripts\dijksta.py", line 2, in &lt;module&gt;
    from priodict import priority_dict
ImportError: cannot import name priority_dict
</code></pre>

<p>These are the files in question:</p>

<p><a href="https://github.com/kqdtran/ADA1/tree/master/dijkstra" rel="nofollow">https://github.com/kqdtran/ADA1/tree/master/dijkstra</a></p>
