## Nemo.ColumnProvider

Nemo.ColumnProvider — Nemo.ColumnProvider Reference

## Synopsis

     Nemo.ColumnProvider {
      get_columns();
    }

## Description

If subclassed, Nemo will request a list of `Nemo.Column` objects, which are then displayed when the user is in `List` mode.

An extension sub-classing `Nemo.ColumnProvider` will almost always want to sub-class `Nemo.InfoProvider` as well, since that is how an extension provides information for each item in a directory listing.

Example 2. Nemo.ColumnProvider Example

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22

    import os
    import urllib

    from gi.repository import Nemo, GObject

    class ColumnExtension(GObject.GObject, Nemo.ColumnProvider, Nemo.InfoProvider):
        def __init__(self):
            pass

        def get_columns(self):
            return Nemo.Column(name="NemoPython::block_size_column",
                                   attribute="block_size",
                                   label="Block size",
                                   description="Get the block size"),

        def update_file_info(self, file):
            if file.get_uri_scheme() != 'file':
                return

            filename = urllib.unquote(file.get_uri()[7:])

            file.add_string_attribute('block_size', str(os.stat(filename).st_blksize))

## Passive Methods

### Nemo.ColumnProvider.get_columns

    get_columns();

Returns : | a list of `Nemo.Column`

The `get_columns`() method returns a list of `Nemo.Column`.