New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding File Handling to the Python Learning List #76
Comments
I am interested in contributing to this resource compilation, so if you like this suggestion could you assign it to me? |
Hi @ArcXeon thanks for raising up your interest. How were you planning to teach file handling concept(s) to people? Also, what did you think of these lessons?
I'd like to know if there's more that can be done in those lessons to showcase file handling / file formats. |
Hi @huangsam, the context_manager.py provides a good example of how to create and use context managers in Python, specifically for handling file-like objects using the StringIO class. But I think it doesn't directly demonstrate all aspects of file handling basics (like reading, writing, or appending to files on disk). An additional code can be created to demonstrate reading from, writing to, or appending to real files on disk using the built-in open function and various modes like "r" (read), "w" (write), and "a" (append). This would give new learners a more comprehensive understanding of file handling in Python. I think this code can be added in the syntax with beginner level difficulty. |
I think that file oriented stuff is complex. Not sure if it's what I would teach early on. Also we'd likely want to limit to in-memory file manipulation due to the nature of this repo Do you think adding code or comments to the later lessons could help here? |
So maybe it can be added in advanced or maybe just adding it as an external resource along with the context manager or data format. |
Yea how does that sound? |
Hi @ArcXeon do you have any additional Qs or concerns? If not, feel free to create the PR in the next few weeks. Looking forward to more collaborations together! |
@huangsam So like I should proceed with my last suggestion and make a PR ? |
Yes you can make a PR |
Suggestion-
File handling deserves a place on the list due to its fundamental role in Python programming. It encompasses the essential skills required to interact with files, which are ubiquitous in software development.
Here's why it's crucial to include file handling:
Data Storage: Files are commonly used to store data, such as user preferences, configuration settings, or even entire datasets. Learning file handling allows developers to read and write data effectively.
External Data Sources: In real-world applications, you often need to read data from external files, like text, CSV, JSON, or XML files. File handling equips you with the ability to extract and process this information.
Data Persistence: When building applications, it's crucial to save data so that it can be used later. File handling enables the persistence of data, ensuring that it remains available across sessions.
Logging: Many applications log events and errors to files. Understanding file handling is essential for managing log files effectively.
The text was updated successfully, but these errors were encountered: