0

I have a python file:

myFile.py

def get_value(data):#pass in data as input parameter
    output = process(data)#function to process data
    return output

Here, output can be a float number or a string. I want to call this python script from VB.NET. I searched the web and someone suggested

import System.Diagnostics
Process.Start("C:\python " & "myFile.py")

I am not sure if it is correct. Furthermore, it does not receive output in the python file.

What should I do?

Thank you.

1 Answer 1

0

If your python script is just like that your function is never called and therefore doesn't return anything.

I don't know what kind of data you plan to return, if it's simple stuff the perhaps just print it with print(get_value(data)) in the end of the file and capture the printed lines with the VB script?

Sign up to request clarification or add additional context in comments.

2 Comments

Sorry for missing information. Here, output can be a float number or a string.
I have no idea, I don't do VB, but check this answer and see if it helps.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.