This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- encoding: utf-8 -*- | |
""" | |
Utility functions for dealing with URL query strings in Python, | |
i.e., URLs of the form | |
http://example.net?field1=value1&field2=value2 | |
This module includes a pair of helper functions: one for getting the values | |
associated with a particular field; another for setting the query string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import yaml | |
from yaml.representer import SafeRepresenter | |
class LiteralString(str): | |
pass | |
def change_style(style, representer): | |
def new_representer(dumper, data): | |
scalar = representer(dumper, data) |