Before trying anything from QlikView to execute a program outside of it. Please follow the steps mentioned in the below link.
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\
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