Questions tagged [python-server-pages]
32 questions
0
votes
2 answers
Why do local test servers open a "save file" dialog?
I have been trying to develop web pages locally (in Windows 10) and running in my local browser (chrome, vivaldi). Right now I have 3 different ways to run simple servers locally: php's built in server, python's http.server module, and vscode's…

RufusVS
- 4,008
- 3
- 29
- 40
0
votes
1 answer
Python 3.7 TypeError: missing 1 required positional argument: 'input'
I have already finished my function, but when I run the webserver I get the following error:
TypeError : index() missing 1 required positional argument:'input'
This is my code:
from sklearn import tree
from flask import Flask
app =…

Dewadek Krisna
- 13
- 5
0
votes
0 answers
python keyword can't be an expression server
why i got a keyword error on this server script?
i'm already made my inference engine script python (python inference engine script) into a server
after that i'm make a new script that combine that answer with my inference script just like these…

Dewadek Krisna
- 13
- 5
0
votes
1 answer
Is there a way to start a server-like notebook?
Apologies if this is not strictly a programming question, if someone has a better avenue for asking this question, please do let me know. I have been searching for answers, but not finding quite what I am looking for.
There is Jupyter notebook,…

kloop
- 4,537
- 13
- 42
- 66
0
votes
1 answer
Not able to access parts of imported .PY in a .PSP
I'm trying to load a weather plugin for a website I'm working on. The weather plugin is a separate weather.py file located at /var/www/piss/plugins/base/weather.py. In the PSP it seems to import correctly, but I am unable to access any variables…

chris
- 135
- 1
- 5
0
votes
1 answer
How to stop my python server from shutting down after the first connection?
I started writing python servers this week, and I wrote just the simplest server I could make for an example. the server and client use sockets, the server listens to a socket, then sends back to the client what it got after saying "I got: ".
I run…

talbor49
- 3
- 4
0
votes
0 answers
Deploy Rails Server and Python Server on the same Machine
I have a normal rails server already deployed and is running on a ubuntu machine with port 80 for http service.
For the saving cost reason, I would like to run an internal python server on the same ubuntu machine at different port say 8888 and let…

sovanlandy
- 1,700
- 2
- 19
- 24
0
votes
1 answer
Python: For loop problem
I have a PSP page with html embedded. I need to place another for loop so i can insert another %s next to background-color: which will instert a appropriate colour to colour in the html table.
For example i need to insert for z in colours so it can…

James
- 1
- 2
0
votes
4 answers
Python server pages, tables and lists
I am using MySQL and python server pages to show the data in a database. In the db I have selected this data: a list x =[1, 61, 121, 181, 241, 301] and a list of lists z = (['a','b'],['c','d'],['e','f'],['g','h'],['i','j'],['k','l']) and I would…

sat_s
- 277
- 1
- 5
- 11
0
votes
1 answer
Python: PSP & HTML tables
I have a python psp page code is shown below. Currently it only prints out the characters in single rows of 60, with the character count in the left column.
<%
s = ''.join(aa[i] for i in table if i in aa)
for i in range(0, len(s), 60):
…