Where is builtins module located?

0 votes
I checked in all the directories listed in sys.path but I couldn't find any builtins.py file. Where do I find this?
Jun 19 in Python by ana1504.k
• 7,870 points
13 views

1 answer to this question.

0 votes

The module is built-in to the python interpreter.

>>> import builtins
>>> builtins
<module 'builtins' (built-in)>
>>> import sys
>>> sys
<module 'sys' (built-in)>

Such modules are represented with (built-in) as you can see in the above interactive session.

If the module is loaded from a file, it will be represented as follow:

>>> import ftplib
>>> ftplib
<module 'ftplib' from 'C:\\Python34\\lib\\ftplib.py'>
answered Jun 19 by SDeb
• 13,160 points

Related Questions In Python

0 votes
3 answers

What is python? Where it is used?

 Python is develop by Guido Van Rossum ...READ MORE

answered Mar 18 in Python by rajesh kumar
59 views
+1 vote
3 answers
0 votes
0 answers

Is there any module in Python that I can use for Wiki markup?

Hi all, simple question. Is there any ...READ MORE

Jan 22 in Python by Anirudh
• 2,070 points
18 views
0 votes
0 answers

What is the difference between import module and from module import?

When both serves the same purpose, why ...READ MORE

May 22 in Python by Waseem
• 4,480 points
19 views
0 votes
1 answer

Crawling after login in Python

You missed a few login data forms, ...READ MORE

answered Sep 7, 2018 in Python by Priyaj
• 56,520 points
336 views
0 votes
1 answer

Crawling after login in Python

You missed a few login data forms, ...READ MORE

answered Sep 14, 2018 in Python by Priyaj
• 56,520 points
35 views
0 votes
1 answer

“stub” __objclass__ in a Python class how to implement it?

You want to avoid interfering with this ...READ MORE

answered Sep 27, 2018 in Python by Priyaj
• 56,520 points
49 views
+1 vote
1 answer

How is raw_input() and input() in python3.x?

raw_input() was renamed to input() so now input() returns the exact string ...READ MORE

answered Oct 30, 2018 in Python by Priyaj
• 56,520 points
39 views
0 votes
1 answer

How is Python 2.7.3 and Python 3.3 different?

raw_input() is not used in Python 3. Use input()  ...READ MORE

answered Sep 12, 2018 in Python by SDeb
• 13,160 points
34 views
0 votes
1 answer

comparing strings in Python using "==" or "is"

is is used for identity testing and ...READ MORE

answered Sep 19, 2018 in Python by SDeb
• 13,160 points
32 views