Commit bbbd083e authored by Utkarsh Ayachit's avatar Utkarsh Ayachit Committed by Kitware Robot
Browse files

Merge topic 'python-use-non-native-outputwindow'

2f77c17e

 Make pvpython/pvbatch not create Win32OuputWindow.
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Acked-by: Aron Helser's avatarAron Helser <aron.helser@kitware.com>
Merge-request: !2083
parents 413c9ce6 2f77c17e
Pipeline #84624 failed with stage
in 0 seconds
......@@ -12,9 +12,12 @@ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
#include "pvpython.h" // include this 1st.
#include "pvpython.h" // include this 1st.
#include "vtkOutputWindow.h"
#include "vtkPVConfig.h" // Required to get build options for paraview
#include "vtkProcessModule.h"
#ifndef BUILD_SHARED_LIBS
#include "pvStaticPluginsInit.h"
#endif
......@@ -30,5 +33,14 @@ int main(int argc, char* argv[])
#ifndef BUILD_SHARED_LIBS
paraview_static_plugins_init();
#endif
// Setup the output window to be vtkOutputWindow, rather than platform
// specific one. This avoids creating vtkWin32OutputWindow on Windows, for
// example, which puts all Python errors in a window rather than the terminal
// as one would expect.
auto opwindow = vtkOutputWindow::New();
vtkOutputWindow::SetInstance(opwindow);
opwindow->Delete();
return ParaViewPython::Run(vtkProcessModule::PROCESS_BATCH, argc, argv);
}
......@@ -12,9 +12,12 @@ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
#include "pvpython.h" // Include this first.
#include "pvpython.h" // Include this first.
#include "vtkOutputWindow.h"
#include "vtkPVConfig.h" // Required to get build options for paraview
#include "vtkProcessModule.h"
#ifndef BUILD_SHARED_LIBS
#include "pvStaticPluginsInit.h"
#endif
......@@ -30,5 +33,14 @@ int main(int argc, char* argv[])
#ifndef BUILD_SHARED_LIBS
paraview_static_plugins_init();
#endif
// Setup the output window to be vtkOutputWindow, rather than platform
// specific one. This avoids creating vtkWin32OutputWindow on Windows, for
// example, which puts all Python errors in a window rather than the terminal
// as one would expect.
auto opwindow = vtkOutputWindow::New();
vtkOutputWindow::SetInstance(opwindow);
opwindow->Delete();
return ParaViewPython::Run(vtkProcessModule::PROCESS_CLIENT, argc, argv);
}
Subproject commit 37d3d20d79bd67be9fe4af8ac58df916ce18688f
Subproject commit b1da0529e90969873bf185ab452273e0dfed789a
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment