首页 \ 问答 \ Python CMD自动完成(Python CMD autocomplete)

Python CMD自动完成(Python CMD autocomplete)

我目前正在使用Python的CMD模块创建命令行界面。此命令行为表单中的各种函数采用多个参数:“command parametre1 = value1 parametre2 = value2”等等。我想设置TAB自动完成功能参数名称和命令名称。 命令名称自动完成已完成,但仍在使用Parametre的自动完成功能。 帮帮我


I am currently working on creating a command line interface using the Python's CMD module.This command line takes multiple arguments for various functions in the form:" command parametre1=value1 parametre2=value2 " and so on .I want to setup an TAB autocomplete feature for the parametre's names along with the command name. The commmand name Autocomplete is done but struggling with the Parametre's autcomplete. Help


原文:https://stackoverflow.com/questions/35692546
更新时间:2022-05-18 07:05

最满意答案

感谢德克Eddelbuettel,以下工作:

(cd SeqLib; ./configure)

Thanks to Dirk Eddelbuettel, the following worked:

(cd SeqLib; ./configure)

相关问答

更多
  • 这是PyCharm的一个错误。 如果您将脚本从一个文件夹移动到另一个文件夹,它将保存旧路径并使用它,即使您在运行配置中更改了它。 所以重新创建Run配置解决了这个问题。 It was an error of PyCharm. If you're moving your script from one folder to another it saves the old path and working with it, even if you're changed it in Run config. So ...
  • 您可以相应地编辑src/Makevars ,这在Writing R Extensions中有解释: PKG_CFLAGS = $(SHLIB_OPENMP_CFLAGS) PKG_LIBS = $(SHLIB_OPENMP_CFLAGS) 有关详细信息,请参阅上面链接中的第1.2.1.1节。 You edit src/Makevars accordingly, that is explained in Writing R Extensions: PKG_CFLAGS = $(SHLIB_OPENMP_CF ...
  • “包骨架”意味着你应该遵循创建 (简单的,骨架)包(可选) 构建包(并将其安装到tar.gz中)以及安装它。 一旦安装,你可以加载它 ,然后你可以实际执行新功能。 或者,您可以通过Rcpp Attributes和/或inline包进行工作。 "Package skeleton" implies that you are supposed to follow the creation of a (simple, skeleton) package with (optionally) building the ...
  • 正如我在前面的回答中提到的那样 ,你必须纠正CRAN提供的R二进制文件中硬编码的值,这是用旧的 XCode构建的,它仍然有基于g ++的编译器。 你有(至少)三种选择: 直接编辑etc/Makeconf (在R的安装目录下)以纠正CC和CXX以进行clang和clang++ 。 或者,类似地创建或编辑~/.R/Makevars 。 使用这些加载创建环境变量CC和CXX 。 它的长短是CC和CXX具有R编译时的硬编码值,这些值不再与系统上的值相对应(使用XCode 5)。 最终,R将迎头赶上,这种调整将是不必 ...
  • 以下是user95215修改的答案,以便编译,而另一个版本更多的是Rcpp样式: #include using namespace Rcpp; // [[Rcpp::export]] IntegerVector oneMultinomC(NumericVector probs) { int k = probs.size(); SEXP ans; PROTECT(ans = Rf_allocVector(INTSXP, k)); probs = Rf_coe ...
  • 使用cppFunction ,这适用于例如: library(inline) library(Rcpp) src <- ' SEXP hellofun(){ std::vector s; s.push_back("hello"); s.push_back("world"); return Rcpp::wrap(s); }' hello_fun <- cppFunction(src) hello_fun() [1] "hello" "world" Using cppF ...
  • 感谢德克Eddelbuettel,以下工作: (cd SeqLib; ./configure) Thanks to Dirk Eddelbuettel, the following worked: (cd SeqLib; ./configure)
  • 我没有访问OS X机器的权限,但以下版本适用于Debian 8,我在ProfilerStart / ProfilerStop添加了C ++代码(并且根本没有更改您的R代码): // [[Rcpp::depends(RcppArmadillo)]] #include #include // [[Rcpp::export]] arma::vec getEigenValues(arma::mat M) { Profile ...
  • 我不认为这是可能的,因为子模块在git之外只是一个简单的文件。 但是,您可以做的是仅在开发中使用子模块,编译库并将编译后的版本发布到包内的dist/文件夹中。 然后只需将package.json中的main指向编译的库脚本,就可以将其包含在其他项目中。 I don't think that is possible, as the submodule is, outside of git, just a simple file. What you can do, however, is using the s ...
  • 这里有两个完全不同的问题: 获得安装Rcpp所需的一切。 OS X方面应记录在Simon维护的相关页面上。 如果你有工具,并且安装了Rcpp,那么你应该能够执行cppFunction('double nPi(int x) { return x*M_PI; }') ,它使用Rcpp提供的函数来创建可调用的C ++函数你作为nPi() - 和nPi(2)应该返回一个值。 您选择的IDE及其设置。 除了要求它工作之外,这与1没什么关系。 所以我会继续研究1.看看我是否先把它整理好,然后再转向2。 To summa ...

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)