Is smtplib pure python or implemented in C?

Is smtplib pure python or implemented in C?

+5
source share
3 answers

smtplib itself is implemented in python, but the socket is based on C, so its value means both.

+4
source
In [32]: import smtplib

In [33]: smtplib
Out[33]: <module 'smtplib' from '/usr/lib/python2.6/smtplib.pyc'>

Hence smtplib is written in python.

+8
source

Basically pure Python (as a basic implementation, if you go far enough, this is C). You can find the source in the lib \ directory in the Python root directory.

+2
source

All Articles