This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author jjdmol2
Recipients ferringb, ggenellina, jjdmol2, kanru
Date 2009-12-31.08:36:58
SpamBayes Score 1.0978027e-06
Marked as misclassified No
Message-id <1262248621.89.0.184742501526.issue7089@psf.upfronthosting.co.za>
In-reply-to
Content
As there seems to be some interest, I've continued working on patching
this issue.

Attached is an improved version of the patch, including additions to
test_shlex.py. Improved in the sense that newlines after a comment are
not considered to be actually part of the comment (according to POSIX),
which makes a difference when newlines are tokens.

To accomplish this, I had to add an ungetc buffer to shlex, in order to
push back any newlines read by the readline() routine used when a
comment is encountered.

@Gabriel: the test case of no newline at the end of the file after a
comment is addressed.

Relevant POSIX sections are
Shell & Utilities 2.3(10)
Rationale C.2.3
History
Date User Action Args
2009-12-31 08:37:02jjdmol2setrecipients: + jjdmol2, ggenellina, ferringb, kanru
2009-12-31 08:37:01jjdmol2setmessageid: <1262248621.89.0.184742501526.issue7089@psf.upfronthosting.co.za>
2009-12-31 08:37:00jjdmol2linkissue7089 messages
2009-12-31 08:36:59jjdmol2create