Module Location

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • asrekdal
    New Member
    • Mar 2008
    • 4

    Module Location

    Hi,

    I am new to python and am looking for the location of a script/module on my hardrive in order to the view the source. I have noticed alot of modules will be named as the import parameter plus the '.py' but in this case I cannot find a module under the name of the import param.

    Any help would be great!

    -- Andrew
  • jlm699
    Contributor
    • Jul 2007
    • 314

    #2
    As long as everything was installed to the default location, most packages go to the Lib directory....

    For example, I have Python 2.4, which is located under:
    C:\Python24\

    The packages are located under Lib and site-packages...

    C:\Python24\Lib \site-packages

    That's usually where most packages are installed. (in either Lib or site-packages under a directory named after the package)

    Comment

    • mysurface
      New Member
      • Mar 2008
      • 2

      #3
      You should be able to get the path that contains all the libs and packages,

      from distutils.sysco nfig import get_python_lib;
      print get_python_lib( )

      Comment

      • bvdet
        Recognized Expert Specialist
        • Oct 2006
        • 2851

        #4
        Here's another way to find out where modules are:
        [code=Python]
        >>> import sys
        >>> print sys.path
        [/code]

        Comment

        Working...