Go to the documentation of this file.00001
00002
00003
00004 import re;
00005
00006 def TclList2Py(s):
00007 r = []
00008 if s[0] == '{':
00009
00010 j = 0
00011 itm = ""
00012 btwn_items = 1
00013 for i in range(len(s)):
00014 if btwn_items:
00015 if s[i] == '{':
00016 itm = ""
00017 btwn_items = 0
00018 continue
00019
00020 if s[i] == '}':
00021
00022 r.append( itm )
00023 btwn_items = 1
00024 continue
00025
00026 itm = itm + s[i]
00027
00028 else:
00029
00030 r = re.split( s, ' ')
00031
00032 return r