# How to make python script variables available in interactive python shell (like in 5.4.1)

**URL:** https://discourse.paraview.org/t/how-to-make-python-script-variables-available-in-interactive-python-shell-like-in-5-4-1/4057
**Category:** ParaView Support
**Created:** [April 13, 2020, 6:44pm UTC](https://discourse.paraview.org/t/how-to-make-python-script-variables-available-in-interactive-python-shell-like-in-5-4-1/4057 "2020-04-13T18:44:34Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![aerogt3](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/a/3bc359/32.png) [@aerogt3](https://discourse.paraview.org/u/aerogt3)
#### Post date: [April 13, 2020, 6:44pm UTC](https://discourse.paraview.org/t/how-to-make-python-script-variables-available-in-interactive-python-shell-like-in-5-4-1/4057/1 "2020-04-13T18:44:34Z")

</div>

Hello,

In version 5.4.1 of paraview, when launching paraview (GUI) with a python script input, the python script variables are available within paraview’s python shell. This is an extremely cool feature, especially for debugging scripts interactively.

In every newer version, this isn’t the case; opening the python shell (or clicking on it, if it’s visible by default) opens a fresh shell which no longer has access to the script variables.

If there any way to enable the behavior from 5.4.1?

As an example, you can run the following python script, and then manually type “a” into the python shell. In 5.4.1, you’ll see a=2. In 5.7.0, you get “NameError: name ‘a’ is not defined”

pvTest.py:

> import paraview  
> a = 2  
> b = 2  
> print(‘DONE’)

`paraview --script=./pvTest.py`

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [April 14, 2020, 2:58am UTC](https://discourse.paraview.org/t/how-to-make-python-script-variables-available-in-interactive-python-shell-like-in-5-4-1/4057/2 "2020-04-14T02:58:40Z")

</div>

@utkarsh.ayachit : Interesting request you may know more about.
