1

I am using python 2.7 to run a script , I want to call a function which returns some data which is written in python(3.6).What are the ways to call the function present in python3.6 using python2.7 What are the ways to call the function present in python3.6 using python 2.7

import subprocess

import file2

py34 = "C:/ProgramData/Anaconda3/python file2.py"

def main():
    data = subprocess.call(py34, shell =True) 

if __name__=='__main__':
    main()

I have tried this but this will call the script and would not return anything, I want to call a particuler function of file2.py

0 Answers0