I want to run another python file in a python file , passing array as parameter, not a string as parameter.
I could pass a string like this:
os.system("python another_file.py 123")
By the way , the reason why I could not import is that the Variable of tensorflow may conflict.
another_file.py, you can find a way to do this properly by importing and calling functions in the other module. Variable names do not just randomly conflict, module namespaces exist to prevent that in the first place. This is a clear XY problem; we need more information to give good answers.os.system(in that it doesn't implicitly involve all the problems with executing command strings in a subshell), but it's not going to fix terrible designs.Variableof tensorflow may conflict, then just ensure that you are properly namespacing your modules - do animport mymodulethen usemymodule.Variable. Orimport Variable from mymodule as Variable_1. Do not dofrom mymodule import *.