首页 文章
  • 0 votes
     answers
     views

    Python Bottle在404之后没有响应

    我正在运行一个正在监听 0.0.0.0:9000 的Bottle v0.12.15服务器 . 我正在运行它的机器的IP是 192.168.0.16 . 我设置的唯一路线是重定向连接到静态 index.html 页面的任何人 . 每当我访问一个没有从我的网络上的一个设备设置路由的随机网址时,即 192.168.0.16:9000/asdf ,我始终按预期获得 Error: 404 并可以返回索引页...
  • 0 votes
     answers
     views

    Bottle Python ping check 5 ping

    我正在尝试编写一个脚本来打印ping检查到浏览器5 ping . 这个脚本: from bottle import route, run, template import subprocess @route('/pings/<ip>') def ping(ip): param = '-c 1' command = ['ping', param, ip] num =...
  • 0 votes
     answers
     views

    Mod_wsgi Apache Bottle.py:无法导入python模块“server”

    我试图一起使用Bottle.py和mod_wsgi,但我得到一个我无法解决的奇怪错误 . 当我尝试发出curl请求时(“curl http://localhost/myapi/hello1 ") I get the error: " ImportError:没有名为server ". However, if I take out the " import s...
  • 1 votes
     answers
     views

    外部访问时Python瓶问题

    所以我使用python的bottle模块来监听我的服务器上的请求 . 我已经在本地完成了所有测试,现在已经到了部署时间,我无法让它在我的服务器上运行 . from bottle import route, get, post, request, Bottle, run, template @route('/Request/<UniqueID>') #Build Temporary W...
  • 0 votes
     answers
     views

    如何在Raspberry Pi完全启动后自动运行Python脚本?

    我的脚本是/home/hello.py,它正在使用Bottle Web框架 . 我的脚本需要运行 after Raspberry Pi已连接到我的本地网络 . 如果我尝试在启动时自动运行它,它还没有准备就绪 . 我知道我可以使用“crontab -e”并添加@reboot睡眠60秒 - 但我认为睡眠不太可靠 . 我见过的所有其他“运行脚本启动”问题都无济于事,因为它们在启动过程中过早地运行脚本 ...

热门问题