简体   繁体   中英

Use Bottle.py over a wireless network

I want to use bottle.py over a wireless network. Unfortunately I do not know how to go about setting this up. The code I want to execute over a wireless network (Execute from another computer) is:

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)

And to answer question - are you sure you want to bind it only @ 127? What I mean - 127.0... is localhost... try 0.0.0.0 or the IP

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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