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.




3 comments:


  1. Sosyal medya pazarlaması günümüzde önemli bir hale gelirken uygun fiyatlı ve güvenilir araçlar aramak da bir o kadar önem kazanıyor. Bu noktada en ucuz smm panel seçeneklerini incelemek bütçenizi korumanın yanı sıra etkili sonuçlar elde etmenize yardımcı olabilir. Doğru paneli seçerken kalite ve fiyat dengesini göz önünde bulundurmak gerekir. Sonuç olarak uygun fiyatlı ve güvenilir bir hizmet almak için en ucuz smm panel adresini tercih edebilirsiniz.

    ReplyDelete

  Opatch reports 'Cyclic Dependency Detected' error when patching ODI   Issue: When applying a Patch Set Update (PSU) to WebLogic Se...