擅长:python、mysql、java
<p>您可以使用Flask(<a href="http://flask.pocoo.org/" rel="nofollow">http://flask.pocoo.org/</a>)并使脚本逻辑在web服务中使用IP调用它并将参数发送给它。
为了使用全局IP来运行它,您可以使用类似WSGI(<a href="http://wsgi.readthedocs.org/en/latest/" rel="nofollow">http://wsgi.readthedocs.org/en/latest/</a>)的东西。在</p>
<p>示例:</p>
<pre><code>from flask import Flask, request
app = Flask(__name__)
@app.route("/script_name")
def script_name():
#Taking the arguments.
arg1 = device_id = ast.literal_eval(request.data)['arg1']
#Complete the logic here.
if __name__ == "__main__":
app.run()
</code></pre>