Re: Gunicorn - HTTP and HTTPS in the same instance?

2022-01-10 Thread Lars Liedtke
I think this is more a thing of apporach. Nginx is quite simple to install and a config doing nothing else than redirecting https to https and proxying requests to a service (whichever tat is, in your case gunicorn) can become a nobrainer. That is what it became for me. Additionally the config

Inkscape

2022-01-10 Thread Mandy and Michael Wilson via Python-list
hello Python I wonder if you can help me out please. I have recently added an extension into Inkscape called Axidraw which should enable me to hatchfill text, unforunately I am unable to use this facility as when I open a canvas in Inkscape and go to the axidraw extension I receive a mes

Re: What to write or search on github to get the code for what is written below:

2022-01-10 Thread NArshad
Using openpyxl is pretty straightforward: from openpyxl import load_workbook wb = load_workbook(spreadsheet_path) sheet = wb.active # Reading the values in cells: print('Cell A1 contains', sheet['A1'].value) print('Cell A2 contains', sheet['A2'].value) print('Cell B1 contains', sheet['B1'].valu

Re: Gunicorn - HTTP and HTTPS in the same instance?

2022-01-10 Thread Lars Liedtke
server {    listen [::]:80;    listen 80;    server_name api.familie-liedtke.net;    location / {    return 301 https://$host$request_uri;    }    include /usr/local/etc/nginx/include/letsencrypt.conf; } server {    listen 443 ssl http2;    listen [::]:443 ssl http2;    server_name api.f

Re: Inkscape

2022-01-10 Thread Michael Torrie
On 1/10/22 8:27 AM, Mandy and Michael Wilson via Python-list wrote: > I wonder if you can help me out please. I have recently added an > extension into Inkscape called Axidraw which should enable me to > hatchfill text, unforunately I am unable to use this facility as when I > open a canvas in

symlinks with python3 http.server.CGIHTTPRequestHandler

2022-01-10 Thread Nat Taylor
Is it possible to get http.server.CGIHTTPRequestHandler to run a symlink-ed script? In the example below, GET /cgi-bin/test.py results in a 404 because it is a symlink. % mkdir -p test/cgi-bin % cd test % vi test.py % chmod +x test.py % ln -s test.py cgi-bin % cp test.py cgi-bin/test2.py % chmod

Re: What to write or search on github to get the code for what is written below:

2022-01-10 Thread MRAB
On 2022-01-10 16:39, NArshad wrote: Using openpyxl is pretty straightforward: from openpyxl import load_workbook wb = load_workbook(spreadsheet_path) sheet = wb.active # Reading the values in cells: print('Cell A1 contains', sheet['A1'].value) print('Cell A2 contains', sheet['A2'].value) prin

Script profiling details

2022-01-10 Thread Joseph L. Casale
I am trying to track down a slow script startup time. I have executed the script using `python -m cProfile -o profile /path/script.py` and read through the results, but the largest culprit only shows various built-ins. I expected this given the implementation, but I was hoping to get some finer de

Re: Script profiling details

2022-01-10 Thread Barry
S > On 10 Jan 2022, at 19:29, Joseph L. Casale wrote: > > I am trying to track down a slow script startup time. I have executed the > script using `python -m cProfile -o profile /path/script.py` and read through > the results, but the largest culprit only shows various built-ins. > > I expecte

Re: Why operations between dict views return a set and not a frozenset?

2022-01-10 Thread Marco Sulla
On Wed, 5 Jan 2022 at 23:02, Chris Angelico wrote: > > On Thu, Jan 6, 2022 at 8:01 AM Marco Sulla > wrote: > > > > On Wed, 5 Jan 2022 at 14:16, Chris Angelico wrote: > > > That's an entirely invisible optimization, but it's more than just > > > "frozenset is faster than set". It's that a frozen

Re: Why operations between dict views return a set and not a frozenset?

2022-01-10 Thread Chris Angelico
On Tue, Jan 11, 2022 at 10:26 AM Marco Sulla wrote: > > On Wed, 5 Jan 2022 at 23:02, Chris Angelico wrote: > > > > On Thu, Jan 6, 2022 at 8:01 AM Marco Sulla > > wrote: > > > > > > On Wed, 5 Jan 2022 at 14:16, Chris Angelico wrote: > > > > That's an entirely invisible optimization, but it's mo

Re: Script profiling details

2022-01-10 Thread Kirill Ratkin
Hi Joseph, ** Did you try scalene profiler? Recently I solved a similar problem and scalene really helped me. ** It creates a well-formed HTML report, and you can optionally enable/disable report about a code outside your project, for example - standard library. ** Her