/usr/lib/python3/dist-packages/TclSup.py is in python3-plplot 5.13.0+dfsg-6ubuntu2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | # Tcl Support module. For coping with Tcl-esque things in Python.
#from regsub import *
import re;
def TclList2Py(s):
r = []
if len(s) > 0:
if s[0] == '{':
# List elements enclosed in braces.
j = 0
itm = ""
btwn_items = 1
for i in range(len(s)):
if btwn_items:
if s[i] == '{':
itm = ""
btwn_items = 0
continue
if s[i] == '}':
# Finishing up an item.
r.append( itm )
btwn_items = 1
continue
itm = itm + s[i]
else:
# List elements delimited by spaces
r = re.split( s, ' ')
return r
|