1,486 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
1
vote
0
answers
38
views
How do you %include multiline in Bottle SimpleTemplate .tpl files?
I am trying to use multiline %includes in Bottle (SimpleTemplate).
Is this actually possible?
<!DOCTYPE html>
<html>
<head>
<title>Employees</title>
<link rel=&...
M.E.'s user avatar
- 5,705
0
votes
1
answer
37
views
python bottle do not display template output when login decorator is used
I am trying to use decorator for verifying user in bottle web framework for python.
following is my login decorator code
def decorate_verify_user(fun):
def nothing():
logging.debug("no ...
0
votes
1
answer
65
views
Python Multithreading: Error <var_name> already defined on variable increase
I am using Python 3.12.7.
I have multiple servers that run themselves multi-threaded in a networked environment.
I want to increase the variable self.msg_id in the handle_message function.
Everything ...
-1
votes
1
answer
166
views
Parameter encoded with encodeURIComponent, how to get it in a Python Bottle server?
Let's say I send a request with JavaScript:
fetch("/query?q=" + encodeURIComponent("c'est un château? Yes & no!"));
to a Python Bottle server:
from bottle import Bottle, ...
-2
votes
1
answer
139
views
How to send an excel file from Python Bottle backend to Vue JS frontend? Using bottle static_file() results in CORS error
How do I send an excel file saved on the PC running the backend to the frontend browser (accessed from another machine) that requests the file?
I have a python bottle backend that I want to use to ...
1
vote
1
answer
74
views
Adding Decorator to a bottle request within a class
I wanted to add a decorator function that wraps a bottle request decorated function within a class, I tried doing it using inspect but I am unable to see any changes done by the decorator when I am ...
0
votes
1
answer
104
views
Telemetry in a Python Bottle API
I have a simple Python Bottle API used to support an iOS app. It is hosted on Heroku.
I use TelemetryDeck for analytics, so I want to send signals with each API call. I'm not using Node so cannot use ...
1
vote
1
answer
172
views
Environment variable PATH_INFO not defined by lighttpd using uwsgi module
I have lighttpd version 1.4.73 running on Alpine Linux. I enabled mod_scgi and added this to my configuration file:
scgi.protocol = "uwsgi"
scgi.server = (
"/tp2/" => ( &...
0
votes
0
answers
345
views
Bottle / Gunicorn not responding to SIGTERM after ANY request
I have used Bottle for a long time and never run into this before, but recently I started a new project and encountered some strange behaviour that I just can not track down at all.
If I start a ...
user avatar
user15567566
0
votes
1
answer
95
views
BottlePy - Serve Static Files From Root Directory
My filetree looks something like so
root/
├─ etc.../
├─ public/
│ ├─ static-file-1.example
│ ├─ etc...
I know I can make a route point to that directory https://site/public/static-file-1.example ...
2
votes
4
answers
7k
views
Python EEL module unable to use import bottle.ext.websocket as wbs ModuleNotFoundError: No module named 'bottle.ext.websocket'
I am trying to create a GUI in python using plain HTML, CSS, JS. I am using python eel module to create a GUI from it. When i tried to execute .py file it says module not found. Here are the code and ...
0
votes
0
answers
42
views
Access python objects from bottle webserver
maybe a stupid question, but I can't think of a logical pythonic way to solve my problem.
I have a application controlling some relays on a Raspberry Pi which I want to write a simple web interface ...
4
votes
3
answers
601
views
Where is the bottleneck in these 10 requests per second with Python Bottle + Javascript fetch?
I am sending 10 HTTP requests per second between Python Bottle server and a browser client with JS:
import bottle, time
app = bottle.Bottle()
@bottle.route('/')
def index():
return ""&...
1
vote
2
answers
1k
views
What does "finally: pass" do in Python? (e.g. in try – except – finally)
I would have assumed a finally clause with only a pass to be pointless.
But in a Bottle template, the following code for an optional include would not work without it.
The result would contain ...
1
vote
1
answer
103
views
How to make an optional include in a bottle template?
I would like to add an optional include in a bottle template.
Unfortunately this does not work as expected:
<foo>
% include(required_view)
<%
try:
include(...