#!/usr/bin/env python
# -*- coding: utf-8 -*-

import subprocess
import paraview.simple as pvs


p = './myXdmfReader.py'
f = './some_xdmf_file.xmf'
state = './reader_debug.pvsm'

save = 1
load = 1

subprocess.call('printf "\033c"', shell=True)
pvs.LoadPlugin(p, remote=True, ns=globals())
if save:
    print('\n#################')
    print('#--- Reading File')
    print('#################\n')
    r = MyXDMFReader(FileName=f)
    pvs.SaveState(state)
    pvs.ResetSession()
if load:
    print('\n##################')
    print('#--- Loading State')
    print('##################\n')
    pvs.LoadState(state)
print('')
