[Python-checkins] python/dist/src/Lib shlex.py,1.20,1.21

niemeyer@users.sourceforge.net niemeyer@users.sourceforge.net
Sat, 19 Apr 2003 18:57:05 -0700


Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1:/tmp/cvs-serv4707/Lib

Modified Files:
	shlex.py 
Log Message:
- Changed shlex.split() method to have more useful and
  meaningful parameters.


Index: shlex.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/shlex.py,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** shlex.py	17 Apr 2003 23:09:08 -0000	1.20
--- shlex.py	20 Apr 2003 01:57:02 -0000	1.21
***************
*** 272,278 ****
          return token
  
! def split(s, posix=True, spaces=True):
!     lex = shlex(s, posix=posix)
!     lex.whitespace_split = spaces
      return list(lex)
  
--- 272,280 ----
          return token
  
! def split(s, comments=False):
!     lex = shlex(s, posix=True)
!     lex.whitespace_split = True
!     if not comments:
!         lex.commenters = ''
      return list(lex)