How to split a string containing nested commas-separated substrings

2008-06-18 Thread Robert Dodier
Hello, I'd like to split a string by commas, but only at the "top level" so to speak. An element can be a comma-less substring, or a quoted string, or a substring which looks like a function call. If some element contains commas, I don't want to split it. Examples: 'foo, bar, baz' => 'foo' 'bar'

Re: Combinatorics

2008-02-12 Thread Robert Dodier
7;s combinatoric functions (since Sage bundles Maxima along with other programs). I don't know if there are combinatoric functions from other packages in Sage. FWIW Robert Dodier -- http://mail.python.org/mailman/listinfo/python-list

Questions about input lines (maximum length and continuation)

2007-07-03 Thread Robert Dodier
y way to allow symbols, operators, and numbers to be broken across lines? Thanks a lot for any information. I appreciate your help. Robert Dodier -- http://mail.python.org/mailman/listinfo/python-list

trying to find repeated substrings with regular expression

2006-03-13 Thread Robert Dodier
But I'd like to better understand regular expressions. Can someone suggest a regular expression which will return groups corresponding to the FOO substrings above? Thanks for any insights, I appreciate it a lot. Robert Dodier -- http://mail.python.org/mailman/listinfo/python-list