斜线和python cmd [英] Slash and python cmd

查看:65
本文介绍了斜线和python cmd的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用cmd模块实现python cmd。我想自动完成文件,因此我实现了一些方法,但是,我发现 complete_put(self,text,line,begidx,endidx):中的text参数去除了所有的'/'字符。谁知道为什么,如何避免这种行为?谢谢:)

I'm trying to implement a python cmd, using the cmd module. I want to autocomplete files, so I've implemented some methods, however, I've seen that the text parameter from "complete_put(self, text, line, begidx, endidx):" strips all the '/' characters. Anyone knows why, and how can I avoid this behaviour? Thanks :)

推荐答案

我解决了。只需修改set_completer_delims属性即可。

I solved it. Just had to modify the set_completer_delims attributes.

这篇关于斜线和python cmd的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆