INSTALLATION DOCUMENTS BY RAVI

Monday, May 21, 2018

Steps for calling a python script in another python script

We will see how to call one python script in another python
script with a simple example below

Python script 1:

t1.py

























The above script will print the value of "a"

The output of python script 1:





To use this python script in another python script:

Use import package to import the python script in another script as below

t2.py




















In the above script

import t1: will import the python script in t1.py to t2.py
b = str(t1.a): will initialize the output of t1.py to the variable "b"
print (b): Prints the value of "b"

The output of python script 2:





Displaying the output of both python scripts.




No comments:

Post a Comment

SQL query to find whether OdiSendMail is configured or not ODI 12c

In the SQL developer connect to the ODI work repository user (Ex: DEV_ODI_REPO) and run the below query. select SCEN_NAME,TASK_NAME3,DE...