Search found 5 matches

by mattzz
Sun Dec 02, 2018 8:15 pm
Forum: Programs, Libraries and Tools
Topic: picoweb - OSError: [Errno 11] EAGAIN
Replies: 2
Views: 4413

Re: picoweb - OSError: [Errno 11] EAGAIN

Bingo. Reverting commit 4737ff8054e84b3ccd1e7364d773a8c1d14095f5 did the trick. (Using micropython/micropython and pfalcon/micropython-lib --- picoweb depends on ulogging which is part of pfalcon/micropython-lib) Thanks for pointing me to https://github.com/micropython/micropython/pull/4322 I see yo...
by mattzz
Sun Dec 02, 2018 5:41 pm
Forum: Programs, Libraries and Tools
Topic: picoweb - OSError: [Errno 11] EAGAIN
Replies: 2
Views: 4413

picoweb - OSError: [Errno 11] EAGAIN

Hi, I'm not exactly sure where to post this or where to file an issue - It seems to be connected to uasyncio and/or picoweb. I'm working on a micropython/picoweb application that is running on an esp8266 based smart socket. After having switched to pfalcon's forks of micropython and micropython-lib ...
by mattzz
Sat Dec 01, 2018 1:54 pm
Forum: Development of MicroPython
Topic: Error building esp8266 port on pfalcon's branch
Replies: 3
Views: 3443

Error building esp8266 port on pfalcon's branch

Hi, I'm trying to build ports/esp8266 on pfalcon's branch/fork of micropython I am on 8f429c8426ff2ea4d1d080ca24d179dedaebc1f2 Compiling master branch works fine. Compiling pfalcon branch results in an error: ... MPY modules/picoweb/__init__.py MPY modules/picoweb/utils.py GEN build/frozen_mpy.c CC ...
by mattzz
Sun Nov 18, 2018 10:52 am
Forum: General Discussion and Questions
Topic: picoweb redirect
Replies: 4
Views: 4024

Re: picoweb redirect

OK, thanks guys.
Here's what I've ended up using:

Code: Select all

@app.route('/some_url')
def some_url(req, resp):
   ...
   (GET/POST parameter handling)
   ...
    # redirect to "/"
    headers = {"Location": "/"}
    yield from picoweb.start_response(resp, status="303", headers=headers)
by mattzz
Tue Nov 13, 2018 7:59 pm
Forum: General Discussion and Questions
Topic: picoweb redirect
Replies: 4
Views: 4024

picoweb redirect

Hi,

having used flask a bit I was wondering what the best way in picoweb was to redirect from one route to another.
Let's say I'm using a certain GET method on route '/switch' to toggle a pin and I want to return to '/index' after that.

Thanks,
/Matthias