Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Hyperlinks
#2
(Feb-10-2023, 07:06 AM)DPaul Wrote: We are NOT talking about an internet environment, just a desktop happening.
You could start a Flask application serving html files on the local host for example (or Bottle, or whatever).
from bottle import route, run, template

@route('/hello/<name>')
def index(name):
    return template('<b>Hello {{name}}</b>!', name=name)

run(host='localhost', port=8080)
or
from flask import Flask

app = Flask(__name__)

@app.route("/")
def hello_world():
    return "<p>Hello, World!</p>"
Reply


Messages In This Thread
Hyperlinks - by DPaul - Feb-10-2023, 07:06 AM
RE: Hyperlinks - by Gribouillis - Feb-10-2023, 08:26 AM
RE: Hyperlinks - by DPaul - Feb-10-2023, 09:13 AM
RE: Hyperlinks - by DPaul - Feb-10-2023, 02:01 PM
RE: Hyperlinks - by Gribouillis - Feb-10-2023, 03:19 PM
RE: Hyperlinks - by DPaul - Feb-11-2023, 07:10 AM
RE: Hyperlinks - by DPaul - Feb-11-2023, 09:40 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020