# pvpython and sys.stdin

**URL:** https://discourse.paraview.org/t/pvpython-and-sys-stdin/6924
**Category:** ParaView Support
**Tags:** python
**Created:** [April 11, 2021, 10:43am UTC](https://discourse.paraview.org/t/pvpython-and-sys-stdin/6924 "2021-04-11T10:43:36Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![TimJim](https://discourse.paraview.org/user_avatar/discourse.paraview.org/timjim/32/1270_2.png) [@TimJim](https://discourse.paraview.org/u/TimJim)
#### Post date: [April 11, 2021, 10:43am UTC](https://discourse.paraview.org/t/pvpython-and-sys-stdin/6924/1 "2021-04-11T10:43:36Z")

</div>

Hi, a quick question about `pvpython` - I noticed that it seems to change `stdin` so that:

```python
>>> sys.stdin
<vtkPythonStdStreamCaptureHelper object at 0x7f36740b5d30>

```

Can I safely reset `sys.stdin = os.fdopen(1)` or is the vtk wrapper required for the correct behaviour of pvpython? I need to take some inputs from another thread via the terminal, but the vtk wrapper blocks the main thread too, unfortunately, (which doesn’t happen with python normally).

If it is required to correctly function, can I temporarily assign the vtk pipe to another variable and reassign it back to `sys.stdin` before I call Paraview-type commands? Or will changing the reference to `vtkPythonStdStreamCaptureHelper` cause it to be garbage collected?

Thanks!
