Struggling to return integer from a Tk Program

morden morden at shadows.net
Sat Jan 18 02:38:16 CET 2003


Dennis Lee Bieber wrote:

> morden fed this fish to the penguins on Tuesday 14 January 2003 06:14
> pm:
>
>
>
> >         def underlinepos(self, str):
> >             comps = string.split( str, '~' )
> >             if(len(comps)<=1):
> >                 return -1, comps[0];
> >             if(len(comps)>2):
> >             # two tildas??????
> >                 noop=1
> >             #print "len is %d %d\r" % ( len(comps), len(comps[0]) )
> >             return len(comps[0]), comps[0]+comps[1]
> >
>
>         It took me forever to figure out the bugs in the above section...
>

Thank you. It looks cleaner now that I implemented your suggestions.
You're in credits now along with Peter. Let me know if you don't want
to appear in comments for a newbie code :-)





More information about the Python-list mailing list