0

我想bottle.py通过无线网络使用。不幸的是,我不知道如何进行设置。我想通过无线网络执行的代码(从另一台计算机执行)是:

import ctypes
from bottle import get, post, request, run

@get('/control')
def message():
    return '''<form method='POST' action='/control'>
        <input name='message'   type='text'/>
        <input type='submit'/>
        </form>'''

@post('/control')
def send():
    Message  =request.forms.get('message')
    MessageBox = ctypes.windll.user32.MessageBoxA
    MessageBox(None,Message,'MESSAGE', 0)

run(host=127.0.0.1, port=8090)
4

1 回答 1

1

并回答问题 - 你确定你只想绑定它@ 127?我的意思是 - 127.0... 是 localhost... 尝试 0.0.0.0 或 IP

于 2012-08-29T01:11:58.530 回答