Skip to main content

A module for parsing EnergyPlus IDF files

Project description

parseidf.py

Parses an IDF file (as used by EnergyPlus) into a dictionary of lists in the following manner:

  • each IDF object is represented by a list of its fields, with the first field being the object type.

  • each such list is appended to a list of objects with the same type in the dictionary, indexed by type:

{ A => [[A, x, y, z], [A, a, b, c]], B => [[B, 1, 2], [B, 1, 2, 3]] }

  • the index keys are all capitalized.

  • also, all field values are strings, i.e. no interpretation of the values is made.

Example

import parseidf

with open(r'in.idf', 'r') as f:
    idf = parseidf.parse(f.read())
print idf.keys()  # lists the object types in the idf file
print idf['OUTPUT:VARIABLE']  # lists all the Output:Variable objects in the idf file

Dependencies

parseidf depends on PLY (Python Lex & Yacc): https://pypi.python.org/pypi/ply/3.4

License & Credit

This project is licensed under the terms of the MIT license. See the file “LICENSE” in the project root for more information.

This module was developed by Daren Thomas at the assistant chair for Sustainable Architecture and Building Technologies (SuAT) at the Institute of Technology in Architecture, ETH Zürich.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

parseidf-1.0.0.tar.gz (3.2 kB view details)

Uploaded Source

File details

Details for the file parseidf-1.0.0.tar.gz.

File metadata

  • Download URL: parseidf-1.0.0.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for parseidf-1.0.0.tar.gz
Algorithm Hash digest
SHA256 41cb51b4d6bd0d66ae147615969ac9467a93e68fb5fd389f3d06a311c9a6f3da
MD5 db028821835398af1288789d271a7067
BLAKE2b-256 6fae50f384e950ee08eff238e5c6d4a324d02b0d90ea8a92149080a1891815f8

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page