Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is smtplib pure python or implemented in C?

Tags:

python

c

smtplib

Is smtplib pure python or implemented in C?

like image 799
Viet Avatar asked Nov 26 '09 02:11

Viet


3 Answers

In [32]: import smtplib

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

Therefore, smtplib is written in python.

like image 91
unutbu Avatar answered Sep 26 '22 02:09

unutbu


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

like image 37
YOU Avatar answered Sep 27 '22 02:09

YOU


Basically pure Python (as the underlying implementation if you go down far enough is C). You can find the source under the Lib\ directory in your Python root.

like image 42
Wayne Koorts Avatar answered Sep 26 '22 02:09

Wayne Koorts