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.

Activity for J-hen‭

Type On... Excerpt Status Date
Edit Post #285274 Initial revision over 2 years ago
Question Open file in script's own folder
I have a Python script that needs to access some data (or configuration) file in its very own folder. For example, say `script.py` does something like this: ```python with open('data.txt') as file: data = file.read() ``` The script will find the file, `data.txt`, if it is run in the term...
(more)
over 2 years ago
Edit Post #284975 Initial revision over 2 years ago
Answer A: Docutils rst2pseudoxml.py reported error: No role entry for "meth"
There is no resolution for this issue as the `meth` role is a syntax extension defined by Sphinx, in what it calls the Python "domain". The standard reStructuredText roles that Docutils supports do not include `meth`.
(more)
over 2 years ago
Edit Post #284646 Initial revision over 2 years ago
Question What is the purpose of `if __name__ == '__main__'`?
I often see the construct `if name == 'main'` in Python code. For example, the `queens.py` demo in the Python repository ends with these two lines: ```python if name == "main": main() ``` However, the `beer.py` demo does not. Both run just fine and display things in the console. Moreover, ...
(more)
over 2 years ago
Edit Post #281519 Post edited:
Fixed typos.
almost 3 years ago
Suggested Edit Post #281519 Suggested edit:
Fixed typos.
(more)
helpful almost 3 years ago