简体   繁体   English

将数据从Java(GUI)发送到Python?

[英]Sending Data From Java(GUI) to Python?

I want to send the data that are getting from GUI component of java program to python program over serial(TxRx) link but I am new to serial programming. 我想通过serial(TxRx)链接将从Java程序的GUI组件获取的数据发送到python程序,但是我是串行编程的新手。 Do I need to use thread in this way of sending data (data from GUI component to serial line). 我是否需要以这种方式使用线程发送数据(从GUI组件到串行线的数据)。 I am also new to thread programming. 我也是线程编程的新手。 Can anybody advice me? 有人可以建议我吗? I really need that program. 我真的需要那个程序。 I have written my GUI program, if need I will sent it but I don't know how to upload the program code. 我已经写了我的GUI程序,如果需要我会发送它,但是我不知道如何上传程序代码。 Thanks 谢谢

Take a look at this post . 看一下这篇文章 It shows Java and Python communicating over UDP Packets. 它显示了Java和Python通过UDP数据包进行通信。 And Java and Arduino communicating over Serial using RxTx Library for Java. Java和Arduino使用Java RxTx库通过Serial进行通信。 You can use the code and modify Java and Python to communicate over Serial. 您可以使用代码并修改Java和Python以通过Serial进行通信。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM