Can somebody explain this. The line number reported by shlex depends
on the previous token. I want to be able to tell if I have just popped
the last token on a line.
import shlex
first = shlex.shlex(word1 word2\nword3)
print first.get_token()
print first.get_token()
print line no,
On 28.09.2013 08:26, Daniel Stojanov wrote:
Can somebody explain this. The line number reported by shlex depends
on the previous token. I want to be able to tell if I have just popped
the last token on a line.
[SNIP]
second = shlex.shlex(word1 word2,\nword3)
Punctuation characters like the
On 28/9/2013 02:26, Daniel Stojanov wrote:
Can somebody explain this. The line number reported by shlex depends
on the previous token. I want to be able to tell if I have just popped
the last token on a line.
I agree that it seems weird. However, I don't think you have made
clear why it's
Dave Angel wrote:
On 28/9/2013 02:26, Daniel Stojanov wrote:
Can somebody explain this. The line number reported by shlex depends
on the previous token. I want to be able to tell if I have just popped
the last token on a line.
I agree that it seems weird. However, I don't think you
Peter Otten __pete...@web.de writes:
Dave Angel wrote:
On 28/9/2013 02:26, Daniel Stojanov wrote:
Can somebody explain this. The line number reported by shlex depends
on the previous token. I want to be able to tell if I have just popped
the last token on a line.
[...]
The explanation