高级配置文件分析器

tconfp的Python项目详细描述


“tconfpy”是 python程序。通过使用“tconfpy”,python程序员可以提供 他们的用户有一个用于设置程序的外部配置文件 选项、定义默认值等。“tconfpy”卸载 解析和验证配置文件的责任 主要应用。python程序员只需要处理 以及在 分析过程。

“tconfpy”识别丰富的配置语言并提供 许多复杂的编程功能,包括:

  • The ability to breakup large configurations into smaller pieces via the ‘.include’ directive.
  • Support for string substitution and concatenation throughout the configuration file via string variables. Variables may be locally declared, a reference to a symbol already in the symbol table, or a reference to an environment variable.
  • A complete set of conditional directives for selective processing of configuration options. Both existential (“If variable exists …”) and comparison (“if string equals/does not equal string …”) forms are provided, as is an ‘.else’ directive.
  • The ability to instantiate program options prior to reading a configuration file and make them mandatory by declaring those options as Read-Only.
  • Optional type validation to ensure that a user enters a value appropriate for boolean, integer, floating point, string, or complex data.
  • Optional value validation to ensure that a configuration option is either within a specified range or one of an enumerated set of possible values. For configuration options which are string types, ‘tconfpy’, can optionally specify min/max string lengths and enumerate a set of legitimate regular expressions that the string must match.
  • The ability to define an arbitrary number of lexical namespaces.
  • The ability to use the various features of ‘tconfpy’ as a pre- processor for any other text (including source code for other programming languages and Python itself) via the ‘.literal’ directive.
  • The ability to “template” classes of variables, thereby predefining the type and value restrictions for such variables. This makes ‘tconfpy’ useful as a building block for data validation tools.
  • An optional debug capability which returns detailed information about each line parsed.
  • Includes a test driver program for learning how to program with ‘tconfpy’ and for debugging and testing your own configuration files.
  • Comes with approximately 40 pages of documentation including a Programmer’s API Reference and a User’s Guide to the ‘tconfpy’ configuration language. Documentation is provided in several formats including Unix ‘man’, Plain Text, html, pdf, and Postscript.

“tconfpy”是一个纯python模块,与平台无关。 它应该在运行python的任何平台上都能相同地工作。

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java有没有工具可以将zephyr转换为velocity模板?   java在安卓 studio中从JSON响应中获取值   jvm如何在Java中设计一个好的permgen空间字符串?   java如何防止Rest webservice使用被盗令牌进行身份验证   java无法遍历列表JSTL   找不到用于ResourceServerTokenServices的java Bean SpringSecurityOauth2   java子字符串替换问题   爪哇玻璃鱼3。十、 以编程方式处理任意HTTPSession的终止   java如何检查输入是否为整数,并在最后添加一个命令来重新启动while循环?   引发java ical4j 1.0.6不可解析日期异常   Java等价于Delphi的DBCtrlGrid?   如果发生错误,java将查找下一个预期标记ANTLR 3   java自打开应用程序(创建锁屏)   java为什么netty有自己的ConcurrentHashMap?   Gradle任务中的java拉取和运行依赖项   继承与Java继承的混淆   java使用shell脚本中的版本执行jar   java我无法让Sqlite数据库与带有Maven的JavaFX应用程序IDE Eclipse包正确通信   java控制台日志未通过org打印。阿帕奇。hadoop。mapreduce。作业的waitForCompletion(true)方法   JAVAlang.NoSuchMethodError:apachestorm螺栓中的spring getrequest