menpo/io/output/landmark.py
def LJSONExporter(landmark_group, file_handle):
    r"""
    Given a file handle to write in to (which should act like a Python `file`
    object), write out the landmark data. No value is returned.

    Writes out the LJSON format which is a verbose format that closely
    resembles the landmark group format. It describes semantic labels and
    connectivity between labels. The first axis of the format represents
    the image y-axis and is consistent with ordering within Menpo.

    Parameters
    ----------
    landmark_group : map:`LandmarkGroup`
        The landmark group to write out.
    file_handle : `file`-like object
        The file to write in to
    """
    lg_json = landmark_group.tojson()
    # Add version string
    lg_json['version'] = 2
    return json.dump(lg_json, file_handle, indent=4, separators=(',', ': '),
                     sort_keys=True)
r"""
    Given a file handle to write in to (which should act like a Python `file`
    object), write out the landmark data. No value is returned.

    Writes out the LJSON format which is a verbose format that closely
    resembles the landmark group format. It describes semantic labels and
    connectivity between labels. The first axis of the format represents
    the image y-axis and is consistent with ordering within Menpo.

    Parameters
    ----------
    landmark_group : map:`LandmarkGroup`
        The landmark group to write out.
    file_handle : `file`-like object
        The file to write in to
    
r"""
Given a file handle to write in to (which should act like a Python `file`
object), write out the landmark data. No value is returned.

Writes out the LJSON format which is a verbose format that closely
resembles the landmark group format. It describes semantic labels and
connectivity between labels. The first axis of the format represents
the image y-axis and is consistent with ordering within Menpo.

Parameters

landmark_group : map:`LandmarkGroup`
The landmark group to write out.
file_handle : `file`-like object
The file to write in to
r " " " Given a file handle to write in to ( which should act like a Python ` file ` object ) write out the landmark data . No value is returned . Writes out the LJSON format which is a verbose format that closely resembles the landmark group format . It describes semantic labels and connectivity between labels . The first axis of the format represents the image y - axis and is consistent with ordering within Menpo . Parameters landmark_group : map : ` LandmarkGroup ` The landmark group to write out . file_handle : ` file ` - like object The file to write in to
def LJSONExporter(landmark_group, file_handle):
    lg_json = landmark_group.tojson()
    lg_json['version'] = 2
    return json.dump(lg_json, file_handle, indent=4, separators=(',', ': '),
                     sort_keys=True)
def LJSONExporter ( landmark_group , file_handle ) : lg_json = landmark_group . tojson ( ) lg_json [ 'version' ] = 2 return json . dump ( lg_json , file_handle , indent = 4 , separators = ( ',' , ': ' ) , sort_keys = True )
r"""
Given a file handle to write in to (which should act like a Python `file`
object), write out the landmark data.
r " " " Given a file handle to write in to ( which should act like a Python ` file ` object ) write out the landmark data .
r"""
    Given a file handle to write in to (which should act like a Python `file`
    object), write out the landmark data. No value is returned.

    Writes out the LJSON format which is a verbose format that closely
    resembles the landmark group format. It describes semantic labels and
    connectivity between labels. The first axis of the format represents
    the image y-axis and is consistent with ordering within Menpo.

    Parameters
    ----------
    landmark_group : map:`LandmarkGroup`
        The landmark group to write out.
    file_handle : `file`-like object
        The file to write in to
    """ # Add version string
landmark_group
file_handle