Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »

Welcome to Software Development on Codidact!

Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.

Search

Advanced Search Options

To further refine your search, you can use additional qualifiers such as score:>0.5. For example, the search score:>=0.5 created:<1y grammar would return only posts mentioning "grammar" that have a score >= 0.5 and were created less than a year ago.

Further help with searching is available in the help center.

Quick hints: tag:tagname, user:xxx, "exact phrase", post_type:xxx, created:<N{d,w,mo,y}, score:>=0.5

Filters
109 posts
 
70%
+5 −1
Q&A How do I get the error message out of a requests exception?

I'm trying to log error messages from Requests exceptions. Example: try: make_web_request() except RequestException as ex: logging.error(ex) Example output: ERROR : ('Connection abo...

2 answers  ·  posted 3y ago by ajv‭  ·  last activity 3y ago by hoverhell‭

Question python http-request
70%
+5 −1
Q&A Freeing sub-process resources?

I'm using Python to invoke another program in a sub-process. I've noticed my memory sometimes gets so large as to crash the system, and I'm wondering if I'm not correctly cleaning up the memory som...

0 answers  ·  posted 3y ago by Hyperlynx‭  ·  edited 3y ago by Patol75‭

77%
+5 −0
Code Reviews Counting Sundays without Python datetime module

The problem You are given the following information, but you may prefer to do some research for yourself. 1 Jan 1900 was a Monday. Thirty days has September, April, June and November. All t...

1 answer  ·  posted 3y ago by Vinicius Brasil‭  ·  edited 2y ago by hkotsubo‭

Question python date
81%
+7 −0
Code Reviews Detecting balanced parentheses in Python

The problem Given a string s containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. An input string is valid if: Open brackets are closed by ...

5 answers  ·  posted 3y ago by Vinicius Brasil‭  ·  last activity 6mo ago by Dirk Herrmann‭

Question python
84%
+9 −0
Q&A What is a good modern language to use for a Business Rules project?

This is a rather vague question, but I'm trying to solve a specific problem and I'm inexperienced in most of the potential solutions, so please forgive the inherent ambiguity. I have access to a d...

3 answers  ·  posted 3y ago by Sigma‭  ·  last activity 1y ago by matthewsnyder‭

Question business-rules
22%
+0 −5
Q&A Are the terms "property" and "method" practical in programming languages other than JavaScript? [closed]

I would say that the terms "property" and "method" are basic in JavaScript programming (at least in the context of web/front), but are they basic or common in other programming languages such as C,...

0 answers  ·  posted 3y ago by deleted user  ·  closed 3y ago by Alexei‭

Question terminology
66%
+2 −0
Q&A Unable to use pyttx3 (libespeak.so.1: cannot open shared object file: No such file or directory)

from tkinter import * from tkinter import messagebox, filedialog import pyttsx3 import PyPDF2 import os import webbrowser root = Tk() # root.geometry("500x500") root.title("Audio Book") ...

1 answer  ·  posted 3y ago by Anonymous‭  ·  last activity 3y ago by Alexei‭

62%
+3 −1
Q&A Are there practical reasons for designing a method-only class/object?

Are there practical reasons for designing/implementing a method(s)-only class/object? Follow-up background notes: This question is for languages that are not exclusively Object-Oriented, for exam...

3 answers  ·  posted 3y ago by CodeFarmer‭  ·  last activity 2y ago by hkotsubo‭

37%
+1 −3
Q&A What's the better way to deal with deprecated feature?

It's a very old question came to my mind. Whenever I start building some applications for Android using Android Studio. In every update, lots of tools get deprecated. I know I can use deprecated "t...

0 answers  ·  posted 3y ago by Anonymous‭  ·  edited 3y ago by Anonymous‭

Question android deprecated
80%
+6 −0
Meta Is this a good fit for Code Reviews, and if so, how to best post it?

I've just dived into pygame and written a little game in it, of which I'd like a review (it's my first try of pygame). However I'm not sure if it is a good fit for the site, and if so, how exactly ...

2 answers  ·  posted 3y ago by celtschk‭  ·  last activity 3y ago by Peter Taylor‭

22%
+0 −5
Q&A Adding support on mathematical expressions

MarkFuncs has really gotten huge progress, at least in my eyes, and now, I want to make math possible in the language. Background MarkFuncs is a programming language that I have been working on f...

0 answers  ·  posted 3y ago by General Sebast1an‭  ·  edited 3y ago by Lundin‭

75%
+4 −0
Code Reviews A class to access dicts using attribute syntax

I've written a class that allows to access dictionary entries of arbitrary dicts with appropriate string keys through attribute access syntax on an instance of the class. My questions are: Is...

3 answers  ·  posted 2y ago by celtschk‭  ·  last activity 1mo ago by mudskipper‭

Question python hashmap
87%
+12 −0
Q&A How do I support tab completion in a python CLI program?

I spend a lot of time writing CLI tools in Python, and I would like to support tab-completion in a style similar to Git. For example, subcommands should be tab-completable, options should expand ba...

1 answer  ·  posted 2y ago by ajv‭  ·  last activity 2y ago by hkotsubo‭

71%
+3 −0
Q&A Docutils rst2pseudoxml.py reported error: No role entry for "meth"

docutils's rst2pseudoxml.py is reporting this error: Unknown interpreted text role "meth". even though the build command: sphinx-build -b html -d build/doctrees source build/html runs fine and pro...

1 answer  ·  posted 2y ago by CodeFarmer‭  ·  last activity 2y ago by J-hen‭

75%
+4 −0
Meta Code block in comments is highlighted only when viewed in the thread's link

Code blocks inside comments are hightlighted only if I'm on the comment's thread page. If I view it on the post itself (after expanding the respective thread), it's not highlighted. Example: in ...

0 answers  ·  posted 2y ago by hkotsubo‭  ·  edited 1y ago by Monica Cellio‭

80%
+6 −0
Meta Should I post a link to the Github repo for code reviews?

Hello. Total noob here and noob to this site. I've written a non-trivial program in Python. Code review didn't take the whole thing (400+ lines of code). Should I post a link to my Github repo ...

3 answers  ·  posted 2y ago by joe‭  ·  last activity 1y ago by matthewsnyder‭

60%
+7 −4
Q&A Why can parentheses cause exceptions in Python when using for loops?

Using parentheses in Javascript is always needed when you want to create functions, if/else statements and for/while loops. But in Python it has a function that is called tuples. When using an if s...

1 answer  ·  posted 1y ago by Bennshinpoes‭  ·  edited 1y ago by trichoplax‭

Question python syntax-error
75%
+4 −0
Meta How are software recommendations handled?

How are software recommendations handled on https://software.codidact.com/ ? https://outdoors.codidact.com/ has a "gear recommendations" section, so it seems like Codidact is open to the idea. I s...

1 answer  ·  posted 1y ago by matthewsnyder‭  ·  last activity 1y ago by Lundin‭

Question discussion
42%
+1 −2
Q&A Program freezing in `post_comments_to_lemmy` function due to potential infinite loop

I'm experiencing an issue where my program appears to freeze when executing the post_comments_to_lemmy function. This function fetches comments from the GitHub API and posts them to a Lemmy instanc...

1 answer  ·  posted 12mo ago by ShadowsRanger‭  ·  last activity 12mo ago by __blackjack__‭

Question python
66%
+2 −0
Q&A "Move symbol" refactor for Python in Visual Studio Codium

Is there a way to add support for "move symbol" in Python code for VS Codium? PyCharm can do this, but I am looking for a VSC solution. PyLance can do this, but PyLance itself is closed source, a...

0 answers  ·  posted 11mo ago by matthewsnyder‭  ·  edited 11mo ago by matthewsnyder‭

71%
+3 −0
Q&A How to resolve the mypy error "Returning Any from function declared to return 'Dict[str, Any]'" in Python?

I have a function that loads JSON data and is declared to return a dictionary with string keys and values of any type (Dict[str, Any]). However, mypy is raising an error stating that I am returning...

1 answer  ·  posted 11mo ago by ShadowsRanger‭  ·  last activity 11mo ago by Moshi‭

Question python mypy
61%
+6 −3
Q&A Why are commas not needed for modulo string formatting when printing?

Suppose I have two variables that are called animal and age, and print them as a string in the console like so: animal = "giraffe" age = 25 print("A %s can live up to %d years" %(animal,age)) ...

3 answers  ·  posted 1y ago by Bennshinpoes‭  ·  edited 11mo ago by Karl Knechtel‭

71%
+3 −0
Meta Handling common wrong approaches and misguided motivations for basic technique questions

Background This is inspired to some extent by https://software.codidact.com/posts/289597 . I'm trying to provide a large amount of content (gradually!) that novices (mainly to Python) will find u...

1 answer  ·  posted 10mo ago by Karl Knechtel‭  ·  last activity 10mo ago by Lundin‭

50%
+1 −1
Q&A Is there a text version of pickle?

Is there a Python serialization format that has capabilities similar to Pickle, but is text based? The problem I always have with pickle is that it's binary, so I can't manually view or edit the d...

0 answers  ·  posted 10mo ago by matthewsnyder‭

66%
+4 −1
Q&A How to overwrite lines of STDOUT in Python?

print() normally adds text to STDOUT, it does not erase existing text. https://linux.codidact.com/posts/289869 describes various ways of doing the overwrite in shell scripts. How can you do this ...

2 answers  ·  posted 9mo ago by matthewsnyder‭  ·  last activity 9mo ago by hkotsubo‭

Question python-3