Skip to content
#

pelican

Here are 381 public repositories matching this topic...

pelican
smartass101
smartass101 commented May 13, 2014

While working on my i18n_subsites plugin, I came up with an idea how to simplify some code that is often used in Pelican: doing stuff with a temporarily different locale.
This could be neatly solved by a context manager:

from contextlib import contextmanager
import locale

@contextmanager
def temporary_locale(temp_locale=None):
    '''Enable code to run in a context with a temporary lo

Improve this page

Add a description, image, and links to the pelican topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the pelican topic, visit your repo's landing page and select "manage topics."

Learn more

You can’t perform that action at this time.