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

  • dbm.rst’s size is 433 Bytes
  • sample.xml’s size is 483 Bytes
  • inline.rst’s size is 928 Bytes
  • legacy.rst’s size is 411 Bytes
  • index.rst’s size is 765 Bytes
  • using.rst’s size is 4476 Bytes
  • sampledbm.dat’s size is 519 Bytes
  • yaml.rst’s size is 954 Bytes
  • csv.rst’s size is 532 Bytes
  • conf.py’s size is 15655 Bytes
  • make_dbm.py’s size is 114 Bytes
  • sample.csv’s size is 36 Bytes
  • _templates’s size is 4096 Bytes
  • sampledbm.dir’s size is 29 Bytes
  • sample-multiple.yaml’s size is 53 Bytes
  • json.rst’s size is 410 Bytes
  • _build’s size is 4096 Bytes
  • sample.yaml’s size is 212 Bytes
  • import-module.rst’s size is 419 Bytes
  • xml.rst’s size is 416 Bytes
  • _static’s size is 4096 Bytes
  • sample.json’s size is 319 Bytes

File Path of the Null Device

/dev/null