python文件调用另一个python脚本背景和访问变量?

时间:2016-11-13 20:00:50

标签: python linux python-2.7 web-services

我有这个场景

我在linux启动时运行了一个python脚本 webservice.py (使用cherrypy)

我有另一个som文件复制的脚本和几个循环 copyfiles.py 并在少数变量(x,y,z)中保存一些值

我如何在后台从 webservice.py 调用(转到http://localhost/start copyfiles.py 并捕获值x,y和z?< / p>

所以当我调用http://localhost/status时,它会从 copyfiles.py 中读取值(x,y和z)并将其返回到网络上?

到目前为止,我在 webservice.py

中提到了这一点
        QVariant currentImage = eQuery.value(5).toByteArray();
        QByteArray bytes = currentImage.toByteArray();
        QImage image;
        image.loadFromData(bytes);

0 个答案:

没有答案