Can this be reversed (Tkinter)?
dave at pythonapocrypha.com
Fri Jan 2 21:57:31 CET 2004
> I am looking at the format used by root.geometry(). The string returned
> from root.geometry() is "%dx%d+%d+%d". Is there a quick and painless
> way to extract the values from that string (i.e., "100x150+25+25" =>
s = '100x150+25+25'
reg = re.compile('(\d+)x(\d+)\+(\d+)\+(\d+)')
[int(x) for x in reg.match(s).groups()]
More information about the Python-list