Questions tagged [cement]

Cement is an advanced CLI Application Framework for Python.

Resources:

  1. project site
  2. pypi.python.org
  3. github
  4. Documentation
6 questions
3
votes
1 answer

Python Cement CLI - print help for subparser when invalid argument given

I am using Python 3.7 and Cement 3.0.4. What I have is a base app with a controller and the controller has a command that takes a single optional argument. What I'm seeing is if I pass the command an invalid argument I get an invalid argument error…
TheMethod
  • 2,893
  • 9
  • 41
  • 72
3
votes
1 answer

Python, py.test and stderr -- capturing logging handler output from Cement logging extension

I have developed an application in Python and am using the Cement CLI library. I am using py.test with the CementTestCase. I can capture the output from stdout in the test cases without a problem, using something like this: with…
robin gist
  • 96
  • 1
  • 7
1
vote
2 answers

How to load JSON config file in cement python app?

I have just started using cement as a python framework. It seems that the default config of the app is not JSON. It seems that Cement has JsonConfigHandler() class that could load JSON configuration into app. I have used the code below in my…
Alireza
  • 6,497
  • 13
  • 59
  • 132
0
votes
0 answers

How to overload the "import" in Python to name a function "import" for the Cement framework

How to overload the "import" in Python to name a function "import" for the Cement framework: So, I am working on a CLI Python project that utilizes the Cement CLI framework. When creating commands for the command line in Cement, what you name the…
0
votes
1 answer

Avoid bad Sphinx formatting of cement configuration

We're using Sphinx to format our Python documentation, and cement to configure our CLIs. Unfortunately, Sphinx generates a lot of nonsensical output from cement configurations. I've been unable to find any Sphinx directive or command line option to…
Arthur
  • 525
  • 7
  • 18
-2
votes
1 answer

How to override Jinja2 extension settings in Cement Framework?

I'm a new user of Cement Framework and Python. I try to override the default configuration of jinja2 template handler to set trim_blocks to True. I see the default value of Environment settings in the extension, but I really wonder where is the…
Fabd
  • 11
  • 3