Skip to main content
-3 votes
1 answer
168 views

When I write obj.attribute in Python, what exactly is the sequence of operations and lookups that Python performs to resolve this attribute? I want to know when and how methods like __getattribute__ ...
brief code's user avatar
2 votes
3 answers
85 views

I have read close to all posts about this topic now but I can get it working, so sorry if you find this similar to other questions, but I can't just solve it based on existing posts. I find it very ...
NewDev's user avatar
  • 99
Best practices
0 votes
7 replies
94 views

Mainly pseudocode: return function(item) if function(item) != item[index] (I'm using Flask with session) With this function above, updated, (accelerated reworking following Tim Roberts suggestion): ...
pvt-Tron's user avatar
2 votes
2 answers
204 views

I intend to design the foundation of an elevated water tank, consisting of a raft with the shape shown in the image below. To do so, I need to determine the raft diameter Dr by solving the following ...
Redouane TEBBOUNE's user avatar
3 votes
1 answer
104 views

Implementing a virtual file system I encounter a circular import problem. common.py: from typing import TYPE_CHECKING if TYPE_CHECKING: from .directory import Directory from .archive import ...
big_cat's user avatar
  • 67
1 vote
1 answer
77 views

I wish to migrate a folder tree structure from one Windows PC to another by running a python script on the destination PC. Here is the code I am using: import shutil import os import sys import ...
dgarrard's user avatar
Advice
0 votes
6 replies
123 views

I need a Python guide that has everything I need, preferably in text mode. You could say it was like a cheat sheet, the main thing is that it was clear and brief. Ideally, it should include key syntax,...
Mason's user avatar
  • 1
1 vote
1 answer
83 views

I'm writing a Python code that's supposed to create a graph and export it as a vector PDF file. I'm using Jupyter Lite at jupyter.org. I've successfully created the graph, but when I try to export it ...
Rain's user avatar
  • 121
Advice
1 vote
6 replies
100 views

I have made a dictionary and a list of dictionaries but I am not sure how to get specific data from the different forms. I tried using '.startswith('7') but always gives me an error. I want to get the ...
Gabriella Dines's user avatar
Advice
1 vote
4 replies
124 views

I have been looking at frameworks for game development and I have found that pygame (a python game development libary) and love2d (a lua game development libary) seem the eisiest to learn. I also know ...
The python duck's user avatar
4 votes
2 answers
79 views

I have been trying to make a scraper that downloads comics from Poorly Drawn Lines but I keep on getting a requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end ...
The python duck's user avatar
2 votes
1 answer
101 views

I tried to debug a notebook in VS Code but I can't. When I set a breakpoint and run debug cell or press F5, I am getting this error /usr/bin/env /home/user/anaconda3/envs/myenv/bin/python /home/user/....
Javad Faraji's user avatar
4 votes
1 answer
72 views

I'm trying to create a shared mutex in python (ala C++ shared_mutex) so I can have multiple threads read a variable while one thread can acquire an exclusive lock (blocking all readers) while it ...
Daniel Marshall's user avatar
4 votes
0 answers
132 views

As part of my application, I want to use QWebEngineView to display the contents of a local markdown file as an HTML page. Local files will end in '.md'. In Qt version 6.9 I wrote the following code to ...
Ian Pickworth's user avatar
1 vote
1 answer
85 views

I have a Python project using pyproject.toml and I want to figure out the best method to automate incrementing the version. The requirements are: Each time the package is modified (e.g.: src/**, ...
DevOps Jeremy's user avatar

15 30 50 per page
1
2 3 4 5
7