mirror of
https://github.com/redoules/redoules.github.io.git
synced 2025-12-13 16:19:34 +00:00
same as before
This commit is contained in:
parent
517100a33b
commit
82768adc01
@ -131,13 +131,15 @@
|
|||||||
<p>In order to open a file, we will use the function open. This function takes two arguments :
|
<p>In order to open a file, we will use the function open. This function takes two arguments :
|
||||||
- the path of the file
|
- the path of the file
|
||||||
- the mode you want to open the file </p>
|
- the mode you want to open the file </p>
|
||||||
<p>The mode can be :
|
<p>The mode can be :</p>
|
||||||
- 'r' : read
|
<ul>
|
||||||
- 'w' : write
|
<li>'r' : read</li>
|
||||||
- 'a' : append (writes at the end of the file)
|
<li>'w' : write</li>
|
||||||
- 'b' : binary mode
|
<li>'a' : append (writes at the end of the file) </li>
|
||||||
- 'x' : exclusive creation
|
<li>'b' : binary mode </li>
|
||||||
- 't' : text mode (by default)</p>
|
<li>'x' : exclusive creation </li>
|
||||||
|
<li>'t' : text mode (by default)</li>
|
||||||
|
</ul>
|
||||||
<p>Note that if the file does not exit it will be created if you use the following options "w", "a", "x".
|
<p>Note that if the file does not exit it will be created if you use the following options "w", "a", "x".
|
||||||
If you try to open a non existing file in read mode 'r', a FileNotFoundError will be returned.</p>
|
If you try to open a non existing file in read mode 'r', a FileNotFoundError will be returned.</p>
|
||||||
<p>It is possible to combine multiple options together. For instance, you can open a file in binary mode for writing using the 'wb' option.</p>
|
<p>It is possible to combine multiple options together. For instance, you can open a file in binary mode for writing using the 'wb' option.</p>
|
||||||
|
|||||||
@ -5,7 +5,7 @@ xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
|||||||
|
|
||||||
<url>
|
<url>
|
||||||
<loc>redoules.github.io/</loc>
|
<loc>redoules.github.io/</loc>
|
||||||
<lastmod>2018-08-03T18:47:07-00:00</lastmod>
|
<lastmod>2018-08-03T18:49:09-00:00</lastmod>
|
||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
<priority>0.5</priority>
|
<priority>0.5</priority>
|
||||||
</url>
|
</url>
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user