Integrating Python from QlikView

I

Before trying anything from QlikView to execute a program outside of it. Please follow the steps mentioned in the below link.

https://help.qlik.com/en-US/qlikview/April2019/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptRegularStatements/Execute.htm

 

I have created a small program for evenodd as below and saved it as evenorodd.py
Below is the python program
import time
num = int(input(“Enter a number: “))
if (num % 2) == 0:
print(“Number is Even”)
else:
print(“Number is Odd”)
time.sleep(5)

After that I have created a QlikView file using my QlikView Desktop and before that follow the steps mentioned in the first link I pasted above

Goto to EditScript of QlikView file and add the below lines and reload the qvw file
Set vPath = ‘python.exe’; #Mention full path if environment variable is not set
Let vFile = chr(34)&‘D:\My Data\Python\Programs\evenorodd.py’&chr(34);

EXECUTE (vPath) (vFile);

Note: The above two variables vPath and vFile must be enclosed in Dollar Symbol
For eg $(vPath) . For some reason this editor is not showing up Dollar Symbol

About the author

Kiran Cherukupally

Add Comment

Kiran Cherukupally

Get in touch

Quickly communicate covalent niche markets for maintainable sources. Collaboratively harness resource sucking experiences whereas cost effective meta-services.

Open chat