Re: Filename case-insensitivity on OS X

2006-01-03 Thread Doug Schwarz
will create two files. -- Doug Schwarz dmschwarzurgrad,rochester,edu Make obvious changes to get real email address. -- http://mail.python.org/mailman/listinfo/python-list

Re: Some more odd behaviour from the Regexp library

2005-10-19 Thread Doug Schwarz
]: b.group(1) Out[5]: '' In [6]: b.group(2) IndexError: no such group The ? tells (.*?) to match as little as possible and that is nothing. If you change it to (.*) it should do what you want. -- Doug Schwarz dmschwarzurgrad,rochester,edu Make obvious changes to get real email address. -- http

Re: Favorite non-python language trick?

2005-06-24 Thread Doug Schwarz
and # print 10 # It seems to me that this trick works in Python,too. print 10 # and # print 10 # You only have to change the first triple quote. -- Doug Schwarz dmschwarzurgrad,rochester,edu Make obvious changes to get real email address. -- http://mail.python.org/mailman/listinfo

Re: Regex for repeated character?

2005-06-17 Thread Doug Schwarz
this: re.findall(.+, foo) # not what I want ['foo'] re.findall(something, foo) # what I want ['f', 'oo'] How's this? [x[0] for x in re.findall(r'((.)\2*)', 'abbccccccbba')] ['a', 'bb', 'ccc', '', 'ccc', 'bb', 'a'] -- Doug Schwarz dmschwarzurgrad,rochester,edu Make obvious

Re: Compute pi to base 12 using Python?

2005-04-13 Thread Doug Schwarz
base 12 or pi. -- Doug Schwarz dmschwarzurgrad,rochester,edu Make obvious changes to get real email address. -- http://mail.python.org/mailman/listinfo/python-list

Re: String Splitter Brain Teaser

2005-03-28 Thread Doug Schwarz
] -- Doug Schwarz dmschwarzurgrad,rochester,edu Make obvious changes to get real email address. -- http://mail.python.org/mailman/listinfo/python-list

Re: String Splitter Brain Teaser

2005-03-27 Thread Doug Schwarz
] -- Doug Schwarz dmschwarzurgrad,rochester,edu Make obvious changes to get real email address. -- http://mail.python.org/mailman/listinfo/python-list

Re: programmatically calling a function

2005-03-05 Thread Doug Schwarz
= eval('len') length = f([1,2,3]) By the way, are you the Dave Ekhaus I used to work with at Kodak? -- Doug Schwarz dmschwarzurgrad,rochester,edu Make obvious changes to get real email address. -- http://mail.python.org/mailman/listinfo/python-list