View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0013456ParaView(No Category)public2012-09-14 10:512012-10-29 17:04
ReporterIan Curington 
Assigned ToUtkarsh Ayachit 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version3.14.1 
Target VersionFixed in Version3.98.0 
Summary0013456: Extend pqPythonManager to execute pvpython from memory buffer rather than file (patch supplied)
DescriptionSummary:
  Request to extend python manager API to execute scripts from string buffer, rather than exclusively from external python file. Why? Within other plugins, filters, C++ programs, can be helpful to execute some small script. Currently, such small script must first be written to file, then executed, then removed.

Patch Submission:

Added executeRawScript() routine to pqPythonManager class to allow easy execution of pvpython scripts from memory-buffer, without needing to output them to external file first.

   patched files: pqPythonManager.[h,cxx]
   action: copy pqPythonManager.[h,cxx] to ParaView-3.14.1/Qt/Python

   DESCRIPTION:
   
   CHANGES: To make this patch, following changes were made (ParaView source patch):

       - Added declaration of added routine executeRawScript(...) to pqPythonManager.h Ln 136,
       - Added additional header files to pqPythonManager.cxx Ln 34-38 and
       - Added implementation of new routine executeRawScript(...) to pqPythonManager.cxx Ln 223-283.

Patch available for both 3.12 and 3.14.1. Tested and currently in production in application.
TagsNo tags attached.
ProjectTBD
Topic Name
Typeincorrect functionality
Attached Filespatch file icon pqPythonManager.patch [^] (4,087 bytes) 2012-09-14 10:51 [Show Content]
? file icon pqPythonManager.h [^] (5,720 bytes) 2012-09-14 10:53
cxx file icon pqPythonManager.cxx [^] (17,898 bytes) 2012-09-14 10:54

 Relationships

  Notes
(0029212)
Pat Marion (reporter)
2012-09-14 14:34

This is possible to do without a patch. You would do this:

#include "pqPythonShell.h"
#include "pqPythonDialog.h"

pythonManager()->pythonShellDialog()->shell()->executeScript("print 'hello world!'");
(0029216)
Utkarsh Ayachit (administrator)
2012-09-18 10:28

Functionality already supported.

Use:
pythonManager()->pythonShellDialog()->shell()->executeScript(....);
(0029248)
Alan Scott (manager)
2012-09-20 20:46

Functionality exist.

 Issue History
Date Modified Username Field Change
2012-09-14 10:51 Ian Curington New Issue
2012-09-14 10:51 Ian Curington File Added: pqPythonManager.patch
2012-09-14 10:53 Ian Curington File Added: pqPythonManager.h
2012-09-14 10:54 Ian Curington File Added: pqPythonManager.cxx
2012-09-14 14:34 Pat Marion Note Added: 0029212
2012-09-18 10:25 Utkarsh Ayachit Assigned To => Utkarsh Ayachit
2012-09-18 10:28 Utkarsh Ayachit Note Added: 0029216
2012-09-18 10:28 Utkarsh Ayachit Status backlog => gatekeeper review
2012-09-18 10:28 Utkarsh Ayachit Fixed in Version => git-master
2012-09-18 10:28 Utkarsh Ayachit Resolution open => fixed
2012-09-18 10:28 Utkarsh Ayachit Status gatekeeper review => customer review
2012-09-20 20:46 Alan Scott Note Added: 0029248
2012-09-20 20:46 Alan Scott Status customer review => closed
2012-10-29 17:04 Utkarsh Ayachit Fixed in Version git-master => 3.98.0


Copyright © 2000 - 2018 MantisBT Team