python: how/where to put a simple libary installed in a well-known-place on my computer

Posted by Jason S on Stack Overflow See other posts from Stack Overflow or by Jason S
Published on 2010-05-17T17:17:14Z Indexed on 2010/05/17 17:20 UTC
Read the original article Hit count: 195

I need to put a python script somewhere on my computer so that in another file I can use it. How do I do this and where do I put it? And where in the python documentation do I learn how to do this? I'm a beginner + don't use python much.


library file: MyLib.py put in a well-known place

def myfunc():
   ....

other file SourceFile.py located elsewhere, doesn't need to know where MyLib.py is:

something = MyLib.myfunc()

© Stack Overflow or respective owner

Related posts about python

Related posts about directory-conventions