Tcl Equivalents of Python Modules, a resource for Python programmers who have seen the light and are migrating Tcl, maps Python modules to equivalent Tcl packages.
Python Module | Python Code | Tcl Package | Tcl Code | Notes |
---|---|---|---|---|
Built-in Types | ||||
Truth Value Testing | ||||
Boolean Operations | ||||
Comparsions | ||||
Numeric Types | ||||
Iterator Types | ||||
Sequence Types | ||||
Text Sequence Types | ||||
Binary Sequence Types | ||||
Set Types | ||||
Mapping Types | ||||
Context Manager Types | ||||
Other Built-in Types | ||||
Special Attributes | ||||
String Services | ||||
string | ||||
re | ||||
difflib | ||||
textwrap | ||||
upicodeata | ||||
stringprep | ||||
readline | ||||
rlcompleter | ||||
Binary Data Services | ||||
struct | ||||
codecs | ||||
Data Types | ||||
datetime | ||||
calendar | ||||
collections | ||||
collections.abc | ||||
heapq | ||||
bisect | ||||
array | ||||
weakref | ||||
types | ||||
copy | ||||
pprint | ||||
reprlib | ||||
Numeric and Mathematical Modules | ||||
numbers | ||||
math | ||||
cmath | ||||
decimal | ||||
fractions | ||||
random | ||||
Functional Programming Modules | ||||
itertools | ||||
functools | ||||
operator | ||||
File and Directory Access | ||||
os.path | ||||
fileinput | ||||
stat | ||||
filecmp | ||||
tempfile | ||||
glob | ||||
fnmatch | ||||
linecache | ||||
shutil | ||||
macpath | ||||
Data Persistence | ||||
pickle | ||||
copyreg | ||||
shelve | ||||
marshal | ||||
dbm | ||||
sqlite3 | ||||
Data Compression and Archiving | ||||
zlib | ||||
gzip | ||||
bz2 | ||||
lzma | ||||
zipfile | ||||
tarfile | Tcllib tar | |||
File Formats | ||||
csv | ||||
configparser | ||||
netrc | ||||
xdrlib | ||||
plistlib | ||||
Cryptographic Services | ||||
hashlib | ||||
hmac | ||||
Generic Operating System Services | ||||
os | ||||
io | ||||
time | ||||
argparse | ||||
optparse | ||||
getopt | ||||
loging | ||||
loging.config | ||||
loging.handlers | ||||
getpass | ||||
curses | ||||
curses.textpad | ||||
curses.ascii | ||||
curses.panel | ||||
platform | ||||
errno | ||||
ctypes | ||||
Concurrent Execution | ||||
threading | ||||
multiprocessing | ||||
The concurrent package | ||||
concurrent.futures | ||||
subprocess | ||||
sched | ||||
queue | ||||
select | ||||
dummy_thread | ||||
_thread | ||||
_dummy_thread | ||||
Interprocess Communication and Networking | ||||
socket | ||||
ssl | ||||
asyncore | ||||
asynchat | ||||
signal | ||||
mmap | ||||
Internet Data Handling | ||||
json | ||||
mailcap | ||||
mailbox | ||||
mimetypes | ||||
base64 | ||||
binhex | ||||
binascii | ||||
quopri | ||||
uu | ||||
Structured Markup Processing Tools | ||||
html | ||||
html.parser | ||||
html.entities | ||||
XML Processing Modules | ||||
XML Vulnerabilites | ||||
xml.etree.ElementTree | ||||
xml.dom | ||||
xml.dom.minidom | ||||
xml.dom.pulldom | ||||
xml.sax | ||||
xml.sax.handler | ||||
xml.sax.saxutils | ||||
xml.sax.xmlreader | ||||
xml.parsers.expat | ||||
Internet Protocols and Support | ||||
webbrowser | ||||
cgi | ||||
cgitb | ||||
wsgiref | ||||
urllib | ||||
urllib.request | ||||
urllib.response | ||||
urllib.parse | ||||
urllib.error | ||||
urllib.rebotparser | ||||
http | ||||
http.client | ||||
ftplib | ||||
poplib | ||||
imaplib | ||||
nntplib | ||||
smtplib | ||||
smtpd | ||||
telnetlib | ||||
uuid | ||||
socketserver | ||||
http.server | ||||
http.cookies | ||||
http.cookie jar | ||||
xmlrpc | ||||
xmlrpc.client | ||||
xmlrpc.server | ||||
ipaddress | ||||
Multimedia Services | ||||
audioop | ||||
aifc | ||||
sunau | ||||
wave | ||||
chunk | ||||
colorsys | ||||
imghdr | ||||
sndhdr | ||||
ossaudiodev | ||||
Internationalization | ||||
gettext | ||||
locale | ||||
Program Frameworks | ||||
turtle | ||||
cmd | ||||
shlex | ||||
Graphical User Interfaces with Tk | ||||
tkinter | ||||
tkinter.ttk | ||||
tkinter.tix | ||||
tkinter.scrolledtext | ||||
IDLE | ||||
Other Graphical User Interface Packages | ||||
Development Tools | ||||
pydoc | ||||
doctest | ||||
unittest | ||||
unittest.mock | ||||
unittest.mock | ||||
2to3 | ||||
test | ||||
test.support | ||||
venv | ||||
Debugging and Profiling | ||||
bdb | ||||
faulthandler | ||||
pdb | ||||
the Python Debugger | ||||
timeit | ||||
trace | ||||
Python Runtime Services | ||||
sys | ||||
sysconfig | ||||
builtins | ||||
_main_ | ||||
warnings | ||||
contestlib | ||||
abc | ||||
atexit | ||||
traceback | ||||
_future_ | ||||
gc | ||||
inspect | ||||
site | ||||
fpectl | ||||
distutils | ||||
Custom Python Interpreters | ||||
code | ||||
codeop | ||||
Importing Modules | ||||
imp | ||||
zipimport | ||||
pkgutil | ||||
modulefinder | ||||
runpy | ||||
importlib | ||||
Python Language Services | ||||
parser | ||||
ast | ||||
symtable | ||||
symbol | ||||
token | ||||
keyword | ||||
tokenize | ||||
tabnanny | ||||
pyclbr | ||||
py_compile | ||||
compileall | ||||
dis | ||||
pickletools | ||||
Miscellaneous Services | ||||
formatter | ||||
MS Windows Specific Services | ||||
msilib | ||||
msvcrt | ||||
winreg | ||||
winsound | ||||
Unix Specific Services | ||||
posix | ||||
pwd | ||||
spwd | ||||
grp | ||||
crypt | ||||
termios | ||||
tty | ||||
pty | ||||
fcntl | ||||
pipes | ||||
resource | ||||
nis | ||||
syslog |