Issue 15074: Strange behaviour of python cmd module. (Ignores slash) (original) (raw)
Issue15074
Created on 2012-06-15 07:41 by jsevilleja, last changed 2022-04-11 14:57 by admin. This issue is now closed.
| Files | |||
|---|---|---|---|
| File name | Uploaded | Description | Edit |
| shell.py | jsevilleja,2012-06-15 07:41 | the code i'm using |
| Messages (2) | ||
|---|---|---|
| msg162854 - (view) | Author: (jsevilleja) | Date: 2012-06-15 07:41 |
| I've used the code from here: http://stackoverflow.com/questions/5637124/tab-completion-in-pythons-raw-input/5638688#5638688 and it works. But I've used the same code in a class which inherits from cmd.Cmd, and the code doesn't works. Doing tests, I've noticed that if I do "put /", the argument text from "complete_put" method, skips '/' character. I don't know if this is a bug or my code is wrong, but it works with any other character, and I haven't found anything in the docs. Thanks. | ||
| msg162898 - (view) | Author: Peter Otten (peter.otten) * | Date: 2012-06-15 13:59 |
| Not a python bug. You are ommitting an important detail of the stackoverflow example in your code: # we want to treat '/' as part of a word, so override the delimiters readline.set_completer_delims(' \t\n;') Please turn to the Python mailing list if you need more help. |
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:57:31 | admin | set | github: 59279 |
| 2012-06-15 19:11:40 | ned.deily | set | status: open -> closedresolution: not a bug |
| 2012-06-15 13:59:20 | peter.otten | set | nosy: + peter.ottenmessages: + |
| 2012-06-15 07:41:31 | jsevilleja | create |