Johnson
Johnson

Reputation: 7

Is there any way to see source functions in Python 3 Modules?

I'm fairly new to the language and am wondering if it's possible to see the functions that are being used in a certain Python 3 module?

Specifically the ones in the "ipaddress" module, thanks!

Upvotes: 0

Views: 56

Answers (2)

John Coleman
John Coleman

Reputation: 51998

In addition to getting the source code online, if you have a standard Python install it should be already sitting in an easily found location on your hard-drive. In my case it is found as a file in C:\Python34\Lib. Needless to say, if you go this route you need to be careful to not modify (or, even worse, delete) the file.

Upvotes: 1

tehp
tehp

Reputation: 6394

Is this what you are looking for?

https://docs.python.org/3/library/ipaddress.html

Generally, this type of information can be found in the languages docs.


As mentioned by John in the comments, implementations can be found here:

http://hg.python.org/cpython/file/3.5/Lib/ipaddress.py

Upvotes: 1

Related Questions