Message148941
| Author |
ekorn |
| Recipients |
ekorn |
| Date |
2011年12月06日.22:33:52 |
| SpamBayes Score |
2.1721791e-11 |
| Marked as misclassified |
No |
| Message-id |
<1323210833.77.0.155317327445.issue13543@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
It seems shlex fails on processing strings ending in space, causing this bug that I reported for IPython:
https://github.com/ipython/ipython/issues/1109
Fernando Perez made a minimal example of the problem, quoted below. As he points out, it would be best to fix this at the source, namely the shlex module.
Python 2.7.2 |EPD 7.1-1 (32-bit)| (default, Jul 3 2011, 15:13:59) [MSC v.1500 32 bit (Intel)] on win32
>>> import shlex
>>> lex = shlex.shlex(' ("a ")', posix=False)
>>> lex.whitespace_split = True
>>> list(lex)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python27\lib\shlex.py", line 269, in next
token = self.get_token()
File "C:\Python27\lib\shlex.py", line 96, in get_token
raw = self.read_token()
File "C:\Python27\lib\shlex.py", line 172, in read_token
raise ValueError, "No closing quotation"
ValueError: No closing quotation |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2011年12月06日 22:33:53 | ekorn | set | recipients:
+ ekorn |
| 2011年12月06日 22:33:53 | ekorn | set | messageid: <1323210833.77.0.155317327445.issue13543@psf.upfronthosting.co.za> |
| 2011年12月06日 22:33:53 | ekorn | link | issue13543 messages |
| 2011年12月06日 22:33:52 | ekorn | create |
|