python: comments: allow "#" as a comment delimiter (for backward compat)

(integrated from master branch change 1864ec9 by Todd Whiteman <toddw@activestate.com>)