cnmllll
V2EX  ›  问与答

Java 调用 Python 可执行程序,获取打印结果

  •  
  •   cnmllll · May 18, 2020 · 1850 views
    This topic created in 2276 days ago, the information mentioned may be changed or developed.

    我想到的方法,python 程序打印结果就是重定向到文件中,之后再读取这个文件的内容
    请问还有其他方法么?

    3 replies    2020-05-18 09:56:01 +08:00
    12tall
        1
    12tall  
       May 18, 2020
    好像可以将 python 进程的 stdio 重定向你的 Java 进程吧,在 nodejs 和 C# 这样弄过
    Vegetable
        2
    Vegetable  
       May 18, 2020
    cnmllll
        3
    cnmllll  
    OP
       May 18, 2020
    @Vegetable 谢谢 懂了
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3323 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 23ms · UTC 11:49 · PVG 19:49 · LAX 04:49 · JFK 07:49
    ♥ Do have faith in what you're doing.