![]() ![]() It allows us to view directories and list their contents in the simplest ways possible. The ‘os’ module allows us to deal with file pathing in our programs. The module has many more uses available as well, and if you want to check out its true potential, feel free to google its documentation online. It provides us with very easy to use functions that allow us to create zip files and add directories, files, and subdirectories to the newly created zip files with minimal effort. The ‘zipfile’ module is pretty self-explanatory. If we are simply going to make a program that does nothing apart from making zip files from existing files, then we would just need to import two modules: Now that we have moved onto the coding part, let us begin by first doing the necessary imports we will need to make this task happen. When that is done, you will now be able to code your archiving programs without any obstacles. When the command has run, it will open the Jupyter notebook interface in your web browser, and from there you can start to code by creating a new notebook file. To start Jupyter notebook, you need to type the following command in the terminal: jupyter notebook (Note: the IDE interface you will see in the screenshots below will be a bit different than your standard Jupyter notebook. You are now sufficiently prepared to write simple Python programs that can make compressed. Sudo apt-get -y install ipython ipython notebook & pip install jupyter
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |