{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Usage" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "#ignore the 3 lines below\n", "import sys\n", "pathnameto_eppy3000 = '../'\n", "sys.path.append(pathnameto_eppy3000)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Read the file\n", "To use eppy3000 in a project:" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\n", "AirLoopHVAC !- EP_KEY\n", " CRAC system !- EPJOBJECT_NAME\n", " CRAC 1 Availability List !- availability_manager_list_name\n", " Air Loop Branches !- branch_list_name\n", " Zone Equipment Inlet Node !- demand_side_inlet_node_names\n", " Zone Equipment Outlet Node !- demand_side_outlet_node_name\n", " 8.5 !- design_supply_air_flow_rate\n", " 0 !- idf_max_extensible_fields\n", " 10 !- idf_max_fields\n", " 31 !- idf_order\n", " Supply Inlet Node !- supply_side_inlet_node_name\n", " Supply Outlet Node !- supply_side_outlet_node_names\n" ] } ], "source": [ "from eppy3000.modelmaker import EPJ\n", "\n", "fname = \"../eppy3000/resources/snippets/V8_9/a.epJSON\"\n", "epj = EPJ(fname)\n", "\n", "print(epj.epobjects['AirLoopHVAC'][0]) # print formattin is slightly broken\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Use the dot syntax\n", "Or in more detail:" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "MinimalShadowing\n", "Suburbs\n" ] } ], "source": [ "from eppy3000.modelmaker import EPJ\n", "from io import StringIO\n", "\n", "txt = \"\"\"\n", "{\n", " \"Building\": {\n", " \"Bldg\": {\n", " \"idf_max_extensible_fields\": 0,\n", " \"idf_max_fields\": 8,\n", " \"idf_order\": 3,\n", " \"loads_convergence_tolerance_value\": 0.05,\n", " \"maximum_number_of_warmup_days\": 30,\n", " \"minimum_number_of_warmup_days\": 6,\n", " \"north_axis\": 0.0,\n", " \"solar_distribution\": \"MinimalShadowing\",\n", " \"temperature_convergence_tolerance_value\": 0.05,\n", " \"terrain\": \"Suburbs\"\n", " }\n", " }\n", "}\n", "\"\"\"\n", "\n", "sio = StringIO(txt)\n", "epj = EPJ(sio)\n", "abuilding = epj.epj.Building.Bldg\n", "print(abuilding.solar_distribution)\n", "print(abuilding.terrain)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## EPJ.epobjects[key]\n", "You can use idfobjects like in eppy:\n", "\n", "the names ahve changed it is epobjects instead of idgobjects" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Suburbs\n" ] } ], "source": [ "buildings = epj.epobjects[\"Building\"]\n", "abuilding = buildings[0]\n", "print(abuilding.terrain)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Other EPJ functions\n", "The following function also work:\n", "\n", "- EPJ.save()\n", "- EPJ.saveas()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Accessing the IDD\n", "Note that you have been opening the IDF file without referring to the IDD file. You can also open the IDF file with an IDD file. The code would look like this:" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\n", "AirLoopHVAC !- EP_KEY\n", " CRAC system !- EPJOBJECT_NAME\n", " CRAC 1 Availability List !- availability_manager_list_name\n", " Air Loop Branches !- branch_list_name\n", " Zone Equipment Inlet Node !- demand_side_inlet_node_names\n", " Zone Equipment Outlet Node !- demand_side_outlet_node_name\n", " 8.5 !- design_supply_air_flow_rate\n", " 0 !- idf_max_extensible_fields\n", " 10 !- idf_max_fields\n", " 31 !- idf_order\n", " Supply Inlet Node !- supply_side_inlet_node_name\n", " Supply Outlet Node !- supply_side_outlet_node_names\n" ] } ], "source": [ "from eppy3000.modelmaker import EPJ\n", "from pprint import pprint\n", "\n", "epschemaname = \"/Applications/EnergyPlus-8-9-0/Energy+.schema.epJSON\"\n", "fname = \"../eppy3000/resources/snippets/V8_9/a.epJSON\"\n", "epj = EPJ(epjname=fname, epschemaname=epschemaname)\n", "print(epj.epobjects['AirLoopHVAC'][0])" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Now you have access to the IDD variables:" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "['branch_list_name',\n", " 'demand_side_outlet_node_name',\n", " 'supply_side_outlet_node_names',\n", " 'connector_list_name',\n", " 'design_return_air_flow_fraction_of_supply_air_flow',\n", " 'controller_list_name',\n", " 'availability_manager_list_name',\n", " 'demand_side_inlet_node_names',\n", " 'supply_side_inlet_node_name',\n", " 'design_supply_air_flow_rate']\n" ] } ], "source": [ "pprint(epj.epschema.epschemaobjects['AirLoopHVAC'].fieldnames())" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "You can look at the property of a particular fieldname:" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "{'data_type': 'object_list',\n", " 'note': 'Name of a BranchList containing all the branches in this air loop',\n", " 'object_list': ['BranchLists'],\n", " 'type': 'string'}\n" ] } ], "source": [ "pprint(epj.epschema.epschemaobjects['AirLoopHVAC'].fieldproperty('branch_list_name'))" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "You can also access the IDD for an IDF object from within the IDF object:" ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "['branch_list_name',\n", " 'demand_side_outlet_node_name',\n", " 'supply_side_outlet_node_names',\n", " 'connector_list_name',\n", " 'design_return_air_flow_fraction_of_supply_air_flow',\n", " 'controller_list_name',\n", " 'availability_manager_list_name',\n", " 'demand_side_inlet_node_names',\n", " 'supply_side_inlet_node_name',\n", " 'design_supply_air_flow_rate']\n", "\n", "{'note': 'Name of a Node or NodeList containing the inlet node(s) supplying '\n", " 'air to zone equipment.',\n", " 'type': 'string'}\n" ] } ], "source": [ "cracsystem = epj.epobjects['AirLoopHVAC'][0]\n", "pprint(cracsystem.eppy_objepschema.fieldnames())\n", "print()\n", "pprint(cracsystem.eppy_objepschema.fieldproperty('demand_side_inlet_node_names'))\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Nested lists or arrays as fields\n", "The old E+ had objects with a flat list of fields. As a result some objects needed repeating or extensible fields. An example of repeating/extensible fields are the coordinates in the object BuildingSurface:Detailed. These are the coordinates of the surface and the number of fields can vary depending on the shape of the surface.\n", "\n", "The new JSON format treats the extensible fields as an array (an array in json and a list in python). Let us explore how to access and modify these list in eppy3000. Let us look at a single surface:" ] }, { "cell_type": "code", "execution_count": 9, "metadata": {}, "outputs": [], "source": [ "txt = \"\"\"\n", "{\n", " \"BuildingSurface:Detailed\": {\n", " \"Zn001:Flr001\": {\n", " \"construction_name\": \"FLOOR\",\n", " \"idf_max_extensible_fields\": 12,\n", " \"idf_max_fields\": 22,\n", " \"idf_order\": 27,\n", " \"number_of_vertices\": 4,\n", " \"outside_boundary_condition\": \"Surface\",\n", " \"outside_boundary_condition_object\": \"Zn001:Flr001\",\n", " \"sun_exposure\": \"NoSun\",\n", " \"surface_type\": \"Floor\",\n", " \"vertices\": [\n", " {\n", " \"vertex_x_coordinate\": 15.24,\n", " \"vertex_y_coordinate\": 0.0,\n", " \"vertex_z_coordinate\": 0.0\n", " },\n", " {\n", " \"vertex_x_coordinate\": 0.0,\n", " \"vertex_y_coordinate\": 0.0,\n", " \"vertex_z_coordinate\": 0.0\n", " },\n", " {\n", " \"vertex_x_coordinate\": 0.0,\n", " \"vertex_y_coordinate\": 15.24,\n", " \"vertex_z_coordinate\": 0.0\n", " },\n", " {\n", " \"vertex_x_coordinate\": 15.24,\n", " \"vertex_y_coordinate\": 15.24,\n", " \"vertex_z_coordinate\": 0.0\n", " }\n", " ],\n", " \"view_factor_to_ground\": 1.0,\n", " \"wind_exposure\": \"NoWind\",\n", " \"zone_name\": \"Main Zone\"\n", " }\n", " }\n", "}\"\"\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Let us open this as an EPJ():" ] }, { "cell_type": "code", "execution_count": 10, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\n", "BuildingSurface:Detailed !- EP_KEY\n", " Zn001:Flr001 !- EPJOBJECT_NAME\n", " FLOOR !- construction_name\n", " 12 !- idf_max_extensible_fields\n", " 22 !- idf_max_fields\n", " 27 !- idf_order\n", " 4 !- number_of_vertices\n", " Surface !- outside_boundary_condition\n", " Zn001:Flr001 !- outside_boundary_condition_object\n", " NoSun !- sun_exposure\n", " Floor !- surface_type\n", " !- vertices\n", " 15.24 !- vertex_x_coordinate #1\n", " 0.0 !- vertex_y_coordinate #1\n", " 0.0 !- vertex_z_coordinate #1\n", " 0.0 !- vertex_x_coordinate #2\n", " 0.0 !- vertex_y_coordinate #2\n", " 0.0 !- vertex_z_coordinate #2\n", " 0.0 !- vertex_x_coordinate #3\n", " 15.24 !- vertex_y_coordinate #3\n", " 0.0 !- vertex_z_coordinate #3\n", " 15.24 !- vertex_x_coordinate #4\n", " 15.24 !- vertex_y_coordinate #4\n", " 0.0 !- vertex_z_coordinate #4\n", " 1.0 !- view_factor_to_ground\n", " NoWind !- wind_exposure\n", " Main Zone !- zone_name\n" ] } ], "source": [ "from io import StringIO\n", "from eppy3000.modelmaker import EPJ\n", "from pprint import pprint\n", "\n", "fhandle = StringIO(txt)\n", "epj = EPJ(epjname=fhandle, epschemaname=epschemaname)\n", "print(epj)\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Notice how the array items are inset. How dow we access the array items ?\n", "\n", "Let us print the field names of `BuildingSurface:Detailed object:`" ] }, { "cell_type": "code", "execution_count": 11, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "['surface_type',\n", " 'number_of_vertices',\n", " 'outside_boundary_condition_object',\n", " 'construction_name',\n", " 'wind_exposure',\n", " 'vertices',\n", " 'view_factor_to_ground',\n", " 'zone_name',\n", " 'sun_exposure',\n", " 'outside_boundary_condition']\n" ] } ], "source": [ "surfs = epj.epobjects[\"BuildingSurface:Detailed\"]\n", "surf = surfs[0]\n", "pprint(surf.eppy_objepschema.fieldnames())" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Notice the field vertices. Let us print and see what is in it:" ] }, { "cell_type": "code", "execution_count": 12, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "[{'vertex_x_coordinate': 15.24,\n", " 'vertex_y_coordinate': 0.0,\n", " 'vertex_z_coordinate': 0.0},\n", " {'vertex_x_coordinate': 0.0,\n", " 'vertex_y_coordinate': 0.0,\n", " 'vertex_z_coordinate': 0.0},\n", " {'vertex_x_coordinate': 0.0,\n", " 'vertex_y_coordinate': 15.24,\n", " 'vertex_z_coordinate': 0.0},\n", " {'vertex_x_coordinate': 15.24,\n", " 'vertex_y_coordinate': 15.24,\n", " 'vertex_z_coordinate': 0.0}]\n" ] } ], "source": [ "pprint(surf.vertices)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Now let is print one vertex:" ] }, { "cell_type": "code", "execution_count": 13, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "{'vertex_x_coordinate': 15.24,\n", " 'vertex_y_coordinate': 0.0,\n", " 'vertex_z_coordinate': 0.0}\n" ] } ], "source": [ "pprint(surf.vertices[0])" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Looking at one coordinate:" ] }, { "cell_type": "code", "execution_count": 14, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "15.24\n" ] } ], "source": [ "print(surf.vertices[0].vertex_x_coordinate)" ] }, { "cell_type": "code", "execution_count": 15, "metadata": {}, "outputs": [], "source": [ "surf.vertices[0].vertex_x_coordinate = 88\n", "surf.vertices.append(dict(vertex_x_coordinate=1.2,\n", " vertex_y_coordinate=2.3,\n", " vertex_z_coordinate=3.4))" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "How did our file change?" ] }, { "cell_type": "code", "execution_count": 16, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\n", "BuildingSurface:Detailed !- EP_KEY\n", " Zn001:Flr001 !- EPJOBJECT_NAME\n", " FLOOR !- construction_name\n", " 12 !- idf_max_extensible_fields\n", " 22 !- idf_max_fields\n", " 27 !- idf_order\n", " 4 !- number_of_vertices\n", " Surface !- outside_boundary_condition\n", " Zn001:Flr001 !- outside_boundary_condition_object\n", " NoSun !- sun_exposure\n", " Floor !- surface_type\n", " !- vertices\n", " 88 !- vertex_x_coordinate #1\n", " 0.0 !- vertex_y_coordinate #1\n", " 0.0 !- vertex_z_coordinate #1\n", " 0.0 !- vertex_x_coordinate #2\n", " 0.0 !- vertex_y_coordinate #2\n", " 0.0 !- vertex_z_coordinate #2\n", " 0.0 !- vertex_x_coordinate #3\n", " 15.24 !- vertex_y_coordinate #3\n", " 0.0 !- vertex_z_coordinate #3\n", " 15.24 !- vertex_x_coordinate #4\n", " 15.24 !- vertex_y_coordinate #4\n", " 0.0 !- vertex_z_coordinate #4\n", " 1.2 !- vertex_x_coordinate #5\n", " 2.3 !- vertex_y_coordinate #5\n", " 3.4 !- vertex_z_coordinate #5\n", " 1.0 !- view_factor_to_ground\n", " NoWind !- wind_exposure\n", " Main Zone !- zone_name\n" ] } ], "source": [ "print(epj)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Deleting, Copying and Creating idfobjects\n", "The following functions are siilar to those in eppy.\n", "\n", "### Creating new idfobjects\n", "Let us start with a blank file:" ] }, { "cell_type": "code", "execution_count": 17, "metadata": {}, "outputs": [], "source": [ "from io import StringIO\n", "from pprint import pprint\n", "from eppy3000.modelmaker import EPJ\n", "\n", "\n", "iddfname = \"/Applications/EnergyPlus-8-9-0/Energy+.schema.epJSON\"\n", "epj = EPJ(epjname=StringIO(\"{}\"), epschemaname=iddfname)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Now let us create a new `BuildingSurface:Detailed` object in it:" ] }, { "cell_type": "code", "execution_count": 18, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\n", "BuildingSurface:Detailed !- EP_KEY\n", " wall1 !- EPJOBJECT_NAME\n", " Autocalculate !- number_of_vertices\n", " WindExposed !- wind_exposure\n", " Autocalculate !- view_factor_to_ground\n", " SunExposed !- sun_exposure\n" ] } ], "source": [ "key = \"BuildingSurface:Detailed\"\n", "objname = \"wall1\"\n", "epj.newepobject(key, objname)\n", "print(epj)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Notice how it put in all the default values. But what if we wanted to create the new object without the default values:" ] }, { "cell_type": "code", "execution_count": 19, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\n", "BuildingSurface:Detailed !- EP_KEY\n", " wall1 !- EPJOBJECT_NAME\n", " Autocalculate !- number_of_vertices\n", " WindExposed !- wind_exposure\n", " Autocalculate !- view_factor_to_ground\n", " SunExposed !- sun_exposure\n", "\n", "BuildingSurface:Detailed !- EP_KEY\n", " wall2 !- EPJOBJECT_NAME\n" ] } ], "source": [ "objname = \"wall2\"\n", "epj.newepobject(key, objname, defaultvalues=False)\n", "print(epj)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Wall2 does not include the default values. Now let us add more values using keyword arguments:" ] }, { "cell_type": "code", "execution_count": 20, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\n", "BuildingSurface:Detailed !- EP_KEY\n", " wall1 !- EPJOBJECT_NAME\n", " Autocalculate !- number_of_vertices\n", " WindExposed !- wind_exposure\n", " Autocalculate !- view_factor_to_ground\n", " SunExposed !- sun_exposure\n", "\n", "BuildingSurface:Detailed !- EP_KEY\n", " wall2 !- EPJOBJECT_NAME\n", "\n", "BuildingSurface:Detailed !- EP_KEY\n", " wall3 !- EPJOBJECT_NAME\n", " Autocalculate !- number_of_vertices\n", " WindExposed !- wind_exposure\n", " Autocalculate !- view_factor_to_ground\n", " SunExposed !- sun_exposure\n", " Surface !- outside_boundary_condition\n", " !- vertices\n", " 15.24 !- vertex_x_coordinate #1\n", " 0.0 !- vertex_y_coordinate #1\n", " 0.0 !- vertex_z_coordinate #1\n" ] } ], "source": [ "objname = \"wall3\"\n", "lastobj = epj.newepobject(key, objname, defaultvalues=True,\n", " outside_boundary_condition=\"Surface\",\n", " vertices=[{'vertex_x_coordinate': 15.24,\n", " 'vertex_y_coordinate': 0.0,\n", " 'vertex_z_coordinate': 0.0}])\n", "\n", "print(epj)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Deleting an idfobject\n", "Deleting an idfobject is equally simple:" ] }, { "cell_type": "code", "execution_count": 21, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\n", "BuildingSurface:Detailed !- EP_KEY\n", " wall2 !- EPJOBJECT_NAME\n", "\n", "BuildingSurface:Detailed !- EP_KEY\n", " wall3 !- EPJOBJECT_NAME\n", " Autocalculate !- number_of_vertices\n", " WindExposed !- wind_exposure\n", " Autocalculate !- view_factor_to_ground\n", " SunExposed !- sun_exposure\n", " Surface !- outside_boundary_condition\n", " !- vertices\n", " 15.24 !- vertex_x_coordinate #1\n", " 0.0 !- vertex_y_coordinate #1\n", " 0.0 !- vertex_z_coordinate #1\n" ] } ], "source": [ "epj.removeepobject(key, \"wall1\")\n", "print(epj)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "How about copying an idfobject:" ] }, { "cell_type": "code", "execution_count": 22, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\n", "BuildingSurface:Detailed !- EP_KEY\n", " wall2 !- EPJOBJECT_NAME\n", "\n", "BuildingSurface:Detailed !- EP_KEY\n", " wall3 !- EPJOBJECT_NAME\n", " Autocalculate !- number_of_vertices\n", " WindExposed !- wind_exposure\n", " Autocalculate !- view_factor_to_ground\n", " SunExposed !- sun_exposure\n", " Surface !- outside_boundary_condition\n", " !- vertices\n", " 15.24 !- vertex_x_coordinate #1\n", " 0.0 !- vertex_y_coordinate #1\n", " 0.0 !- vertex_z_coordinate #1\n", "\n", "BuildingSurface:Detailed !- EP_KEY\n", " wall4 !- EPJOBJECT_NAME\n", " Autocalculate !- number_of_vertices\n", " WindExposed !- wind_exposure\n", " Autocalculate !- view_factor_to_ground\n", " SunExposed !- sun_exposure\n", " Surface !- outside_boundary_condition\n", " !- vertices\n", " 15.24 !- vertex_x_coordinate #1\n", " 0.0 !- vertex_y_coordinate #1\n", " 0.0 !- vertex_z_coordinate #1\n" ] } ], "source": [ "epj.copyepobject(key, \"wall3\", \"wall4\")\n", "print(epj)\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Reading and writing IDF files\n", "Eppy3000 works with JSON files. At the time of this documentation, Energyplus is at version 9.0. This version has only IDF files in the ExampleFolder. Everyone is still using IDF files. Does this mean I cannot use eppy3000 for any real work ?\n", "\n", "If you can read and write IDF files from eppy3000, then eppy3000 would be usable. Here is how you can read an IDF file:" ] }, { "cell_type": "code", "execution_count": 23, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "148653" ] }, "execution_count": 23, "metadata": {}, "output_type": "execute_result" } ], "source": [ "from eppy3000 import idfjsonconverter\n", "\n", "fname = \"../eppy3000/resources/snippets/V9_0/5Zone_Unitary_HXAssistedCoil.idf\"\n", "schemapath = \"/Applications/EnergyPlus-9-0-1/Energy+.schema.epJSON\"\n", "idfhandle = open(fname, 'r')\n", "\n", "jsonstr = idfjsonconverter.idf2json(idfhandle, open(schemapath, 'r'))\n", "jsonfile = \"5Zone_Unitary_HXAssistedCoil.json\"\n", "open(jsonfile, 'w').write(jsonstr)" ] }, { "cell_type": "code", "execution_count": 24, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "169635" ] }, "execution_count": 24, "metadata": {}, "output_type": "execute_result" } ], "source": [ "jsonhandle = open(jsonfile, 'r')\n", "idfcopystr = idfjsonconverter.json2idf(jsonhandle, open(schemapath, 'r'))\n", "outfile = \"5Zone_Unitary_HXAssistedCoil_copy.idf\"\n", "open(outfile, 'w').write(idfcopystr)" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.7.4" } }, "nbformat": 4, "nbformat_minor": 4 }