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

  • nodata.rst’s size is 581 Bytes
  • make_dbm.py’s size is 114 Bytes
  • multiple-sources.rst’s size is 1460 Bytes
  • csv.rst’s size is 532 Bytes
  • sample.xml’s size is 483 Bytes
  • sample-multiple.yaml’s size is 55 Bytes
  • sample.json’s size is 319 Bytes
  • json.rst’s size is 410 Bytes
  • legacy.rst’s size is 411 Bytes
  • inventory.csv’s size is 35 Bytes
  • _static’s size is 4096 Bytes
  • cli.rst’s size is 1112 Bytes
  • history.rst’s size is 3538 Bytes
  • sample.yaml’s size is 212 Bytes
  • yaml.rst’s size is 983 Bytes
  • sampledbm.dat’s size is 519 Bytes
  • install.rst’s size is 480 Bytes
  • part-details.yaml’s size is 115 Bytes
  • conf.py’s size is 16404 Bytes
  • dbm.rst’s size is 433 Bytes
  • sample.csv’s size is 36 Bytes
  • xml.rst’s size is 416 Bytes
  • _templates’s size is 4096 Bytes
  • using.rst’s size is 2220 Bytes
  • index.rst’s size is 822 Bytes
  • _build’s size is 4096 Bytes
  • sampledbm.dir’s size is 29 Bytes
  • inline.rst’s size is 1291 Bytes
  • import-module.rst’s size is 419 Bytes

File Path of the Null Device

/dev/null