Skip to content
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

Closed
ArcXeon opened this issue Sep 26, 2023 · 9 comments · Fixed by #103
Closed

Adding File Handling to the Python Learning List #76

ArcXeon opened this issue Sep 26, 2023 · 9 comments · Fixed by #103

Comments

@ArcXeon
Copy link
Contributor

ArcXeon commented Sep 26, 2023

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.

@ArcXeon
Copy link
Contributor Author

ArcXeon commented Sep 26, 2023

I am interested in contributing to this resource compilation, so if you like this suggestion could you assign it to me?

@huangsam
Copy link
Owner

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.

@ArcXeon
Copy link
Contributor Author

ArcXeon commented Sep 30, 2023

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.

@huangsam
Copy link
Owner

huangsam commented Oct 6, 2023

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?

@ArcXeon
Copy link
Contributor Author

ArcXeon commented Oct 6, 2023

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.

@huangsam
Copy link
Owner

huangsam commented Oct 7, 2023

Yea how does that sound?

@huangsam
Copy link
Owner

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!

@ArcXeon
Copy link
Contributor Author

ArcXeon commented Oct 13, 2023

@huangsam So like I should proceed with my last suggestion and make a PR ?

@huangsam
Copy link
Owner

Yes you can make a PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants