Changeset 5512

Show
Ignore:
Timestamp:
06/15/12 08:19:10 (7 years ago)
Author:
justinc
Message:

Kathy Ou's fix for #1033.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • seattle/trunk/seash/seash.py

    r4425 r5512  
    208208        userinput = raw_input(prompt) 
    209209         
     210        # allows commenting 
     211        comment_index = userinput.find('#') 
     212 
     213        # throw away anything after (and including) the '#' 
     214        if comment_index != -1: 
     215          userinput = userinput[0:comment_index] 
     216 
     217        # drop any leading or trailing whitespace 
     218        userinput = userinput.strip() 
     219 
     220        # if it's an empty line, continue... 
    210221        if len(userinput)==0: 
    211222          continue