Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Webapp Debugging
-
How can I debug my webapp in Pythonista? In the python learning book they use this code:
app.run(debug=True)
It doesn't function in Pythonista and I get these messages:
- Running on http://127.0.0.1:5000/
- Restarting with reloader
and some error messages.
Here is my webapp code:
from flask import Flask, render_template app = Flask(__name__) @app.route('/') def hello() -> str: return 'Hello world from Flask!' @app.route('/search4', methods=['POST']) def do_search() -> str: return str(search4letters('life, the universe and everything','eiru,!')) @app.route('/entry') def entry_page() -> 'html': return render_template('entry.html', the_title='Welcome to search for letters on the web!') app.run(debug=True)
-
Flask's auto-reloader doesn't work in Pythonista because it would require spawning subprocesses which isn't possible on iOS.
You can pass
use_reloader=False
toapp.run()
though, and debugging should still work.