python进程通信

    技术2024-07-20  68

    def test(): print("123") if __name__ == "__main__": test() # -*- coding: utf-8 -*- import os cur_path = os.getcwd() scrip_path = os.path.join(cur_path, "01.py") command = f"python3 {scrip_path}" result = os.popen(command).read() print(type(result)) print(result)
    Processed: 0.026, SQL: 9