473,387 Members | 3,781 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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
Mar 5 '08 #1
3 1673
jlm699
314 100+
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)
Mar 5 '08 #2
You should be able to get the path that contains all the libs and packages,

from distutils.sysconfig import get_python_lib;
print get_python_lib()
Mar 5 '08 #3
bvdet
2,851 Expert Mod 2GB
Here's another way to find out where modules are:
Expand|Select|Wrap|Line Numbers
  1. >>> import sys
  2. >>> print sys.path
  3.  
Mar 5 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Oliver Spiesshofer | last post by:
Hi, I am trying to load the LDAP and the MCrypt module under WinXP and PHP Version 4.3.7. The strange thing is that I have several other modules that work just fine: extension=php_bz2.dll...
0
by: Josiah Carlson | last post by:
Good day everyone, I have produced a patch against the latest CVS to add support for two new formatting characters in the struct module. It is currently an RFE, which I include a link to at the...
3
by: Phd | last post by:
Hi, I'm using python 2.2, I want to import a module by referring to its relative location. The reason for this is that there is another module with the same name that's already in pythonpath(...
2
by: Bert Szoghy | last post by:
Hello, I am missing something about Visual Basic .NET module variables and window close events. In the following code, after opening Form2 by clicking a button on Form1 and then closing...
0
by: Steven Bethard | last post by:
Ok, so I have a module that is basically a Python wrapper around a big lookup table stored in a text file. The module needs to provide a few functions:: get_stem(word, pos, default=None)...
2
by: Thomas Dybdahl Ahle | last post by:
Is it possible for an imported module to find its own location? -- Programmers should realize their critical importance and responsibility in a world gone digital. They are in many ways similar to...
32
by: Matias Jansson | last post by:
I come from a background of Java and C# where it is common practise to have one class per file in the file/project structure. As I have understood it, it is more common practice to have many...
2
by: dmitrey | last post by:
my Python module was changed in HDD (hardware disk drive), moreover, changed its location (but still present in sys.path). how can I reload a func "myfunc" from the module? (or howto reload whole...
40
by: rjcarr | last post by:
Sorry if this is a completely newbie question ... I was trying to get information about the logging.handlers module, so I imported logging, and tried dir(logging.handlers), but got: ...
2
by: emallove | last post by:
I'm running into the below "No modules named _sha256" issue, with a python installed in a non-standard location. $ python Python 2.5.2 (r252:60911, May 20 2008, 09:46:50) on linux2 Type...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.