/usr/lib/python2.7/dist-packages/TclSup.py is in python-plplot 5.10.0+dfsg2-0.1ubuntu2.
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 | # Tcl Support module. For coping with Tcl-esque things in Python.
#from regsub import *
import re;
def TclList2Py(s):
r = []
if s[0] == '{':
# List elements eclosed 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
|