Change how Python Cmd Module handles autocompletion

后端 未结 3 2040
旧时难觅i
旧时难觅i 2021-02-04 10:40

I have a Cmd console set up to auto-complete card names for a Magic: the Gathering collection management system.

It uses the text parameter to query the database for car

3条回答
  •  感动是毒
    2021-02-04 11:00

    You could do readline.set_completer_delims('').

    However, your complete_* functions won't be called anymore; you will have to override Cmd.complete or Cmd.completenames. Look at the sourcecode of the cmd module for details.

提交回复
热议问题