Running python in virtual environment

I have some python scripts that want to run by Node-Red with a few questions:

  1. From Node-Red, how to pass A, B, C or D to specific functions in a Class?

Python script (eg)
Class math
def multiply(A, B):
print (A * B)

def sum(C, D):
print (C+D)

  1. How to run python in a virtual environment? I try to run by Pythonshell but seems it runs on Python 2.x? I need to run Python 3.x.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.