# How to get list of available blocks from a reader in ParaView 5.11 in Python interface

**URL:** https://discourse.paraview.org/t/how-to-get-list-of-available-blocks-from-a-reader-in-paraview-5-11-in-python-interface/12127
**Category:** ParaView Support
**Tags:** python
**Created:** [May 19, 2023, 7:23pm UTC](https://discourse.paraview.org/t/how-to-get-list-of-available-blocks-from-a-reader-in-paraview-5-11-in-python-interface/12127 "2023-05-19T19:23:16Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Andy\_Bauer](https://discourse.paraview.org/user_avatar/discourse.paraview.org/andy_bauer/32/5442_2.png) [@Andy\_Bauer](https://discourse.paraview.org/u/Andy_Bauer)
#### Post date: [May 19, 2023, 7:23pm UTC](https://discourse.paraview.org/t/how-to-get-list-of-available-blocks-from-a-reader-in-paraview-5-11-in-python-interface/12127/1 "2023-05-19T19:23:16Z")

</div>

Hi,

What is the proper way to get a list of available blocks in a reader (my reader is the IOSSReader) when I’m in the Python shell?

I can see that the reader is going to read in `reader.ElementBlocks` but it would be nice if there was a `reader.ElementBlocksAvailable` property showing me what’s available from the reader.

Thanks,  
Andy

---

<div class="post-metadata">

### Author: ![cory.quammen](https://discourse.paraview.org/user_avatar/discourse.paraview.org/cory.quammen/32/11193_2.png) [@cory.quammen](https://discourse.paraview.org/u/cory.quammen)
#### Post date: [May 22, 2023, 2:17pm UTC](https://discourse.paraview.org/t/how-to-get-list-of-available-blocks-from-a-reader-in-paraview-5-11-in-python-interface/12127/2 "2023-05-22T14:17:12Z")

</div>

Andy, you can do this to get the list of element block names:

```python
s = IOSSReader(...)
s.GetProperty('ElementBlockInfo')[:-1:2]

```

Nope, it’s not obvious. ElementBlockInfo is an information\_only property, so it is not made available as an attribute on the `s` object, hence the `GetProperty()` call.

---

<div class="post-metadata">

### Author: ![utkarsh.ayachit](https://discourse.paraview.org/user_avatar/discourse.paraview.org/utkarsh.ayachit/32/39_2.png) [@utkarsh.ayachit](https://discourse.paraview.org/u/utkarsh.ayachit)
#### Post date: [May 24, 2023, 3:28pm UTC](https://discourse.paraview.org/t/how-to-get-list-of-available-blocks-from-a-reader-in-paraview-5-11-in-python-interface/12127/3 "2023-05-24T15:28:09Z")

</div>

You can also use the `GetAvailable()` API call:

```python
>>> ioss_reader = OpenDataFile("..can.ex2")
>>> ioss_reader.ElementBlocks.GetAvailable()
['block_1', 'block_2']

# also supported by other "selection" properties, e.g.
>>> a.NodeSets.GetAvailable()
['nodelist_1', 'nodelist_100']
>>> a.ElementBlockFields.GetAvailable()
['EQPS']
>>> a.NodeBlockFields.GetAvailable()
['ACCL', 'DISPL', 'VEL']

```
