有人知道如何在不使用的情况下读取python文件吗py处理或其他第三方库或平台?我有一个python文件,可以生成一个文本,并希望我的处理实时读取它。但是“loadStrings”的东西似乎有问题,因为我的三行文本不是同时生成的,我的第三行总是比前两行慢一点,所以处理草图在某个时候把它弄乱了。如何处理这个问题?在
String[] lines;
PFont font;
void setup() {
size(800, 600);
font = createFont("Arial", 16);
frameRate(2);
//lines = loadStrings("output.txt");
}
void draw() {
background(255);
textFont(font);
fill(0);
lines = loadStrings("output.txt");
for (int i = 0; i < 3; i++) {
String word = lines[i];
text(word, random(width), random(height));
}
// noLoop();
}
我的Python素描:
^{pr2}$
您可以使用java的运行时和Process类:
比如说10.py公司名称:
^{pr2}$我会看到一条信息打印了10次:
相关问题 更多 >
编程相关推荐