Import-Module Samples

Template File

.. -*- mode: rst -*-

Static Heading
--------------

List of Directory Entries
~~~~~~~~~~~~~~~~~~~~~~~~~~

{% for item in data.scandir() %}
- {{item.name}}'s size is {{item.stat().st_size}} Bytes
{% endfor %}

File Path of the Null Device
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

``{{data.devnull}}``

Loading the Template

.. datatemplate:import-module:: os
   :template: import-module-sample.tmpl

Rendered Output

Static Heading

List of Directory Entries

  • sample.csv’s size is 36 Bytes

  • _static’s size is 4096 Bytes

  • install.rst’s size is 480 Bytes

  • using.rst’s size is 2220 Bytes

  • sample.yaml’s size is 212 Bytes

  • sampledbm.dat’s size is 519 Bytes

  • dbm.rst’s size is 433 Bytes

  • history.rst’s size is 4385 Bytes

  • sampledbm.dir’s size is 29 Bytes

  • sample.json’s size is 319 Bytes

  • inline.rst’s size is 1291 Bytes

  • json.rst’s size is 410 Bytes

  • sample.xml’s size is 483 Bytes

  • inventory.csv’s size is 35 Bytes

  • _build’s size is 4096 Bytes

  • make_dbm.py’s size is 114 Bytes

  • csv.rst’s size is 532 Bytes

  • multiple-sources.rst’s size is 1460 Bytes

  • part-details.yaml’s size is 115 Bytes

  • yaml.rst’s size is 983 Bytes

  • xml.rst’s size is 416 Bytes

  • sample-multiple.yaml’s size is 55 Bytes

  • cli.rst’s size is 1112 Bytes

  • index.rst’s size is 822 Bytes

  • _templates’s size is 4096 Bytes

  • nodata.rst’s size is 581 Bytes

  • conf.py’s size is 16073 Bytes

  • legacy.rst’s size is 411 Bytes

  • import-module.rst’s size is 419 Bytes

File Path of the Null Device

/dev/null