# Paraview python annotation filter: Get name of file of a PVD reader as its input

**URL:** https://discourse.paraview.org/t/paraview-python-annotation-filter-get-name-of-file-of-a-pvd-reader-as-its-input/9998
**Category:** ParaView Support
**Created:** [July 13, 2022, 11:08am UTC](https://discourse.paraview.org/t/paraview-python-annotation-filter-get-name-of-file-of-a-pvd-reader-as-its-input/9998 "2022-07-13T11:08:54Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![sancho\_s](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/s/c4cdca/32.png) [@sancho\_s](https://discourse.paraview.org/u/sancho_s)
#### Post date: [July 13, 2022, 11:08am UTC](https://discourse.paraview.org/t/paraview-python-annotation-filter-get-name-of-file-of-a-pvd-reader-as-its-input/9998/1 "2022-07-13T11:08:54Z")

</div>

I have a pipeline with a `PVDReader` as a source, and a filter on it of type `PythonAnnotation`.  
Selecting the filter,

```
>>> flt = GetActiveSource()
>>> flt
<paraview.servermanager.PythonAnnotation object at 0x7f4190035eb0>
>>> inp = flt.Input
>>> inp
<paraview.servermanager.PVDReader object at 0x7f4190035fa0>

```

The reader `inp` got the data from file `dir1/dir2/dir3/mydata.pvd`.

I also have a `RenderView1` where I plot data from the reader.  
I want to add the annotation `dir2` (not fixed, but obtained dynamically from the path above).  
I set the PythonAnnotation filter to obtain such data.  
But I don’t know the appropriate expression.  
I could not figure this out from the documentation.  
**What should that be?**

Note: if I use `input` for `flt.Expression`, I get a different object as compared to `inp` above. I am copying an image of the result, since I cannot copy the result of the annotation.

![image](https://discourse.paraview.org/uploads/default/original/2X/f/f5f4c4000817d22eacad2d82d99ad754be51e675.png)
