You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
2.1 KiB
HTML

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<!DOCTYPE html>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Tasks of the Contingent Librarian</title>
<link rel="stylesheet" type="text/css" href="tasks.css">
<script src="tasks.js"></script>
</head>
<body>
<div class="cardback"><DOCUMENT_FRAGMENT><div class="mw-parser-output"><div class="thumb tright"><div class="thumbinner" style="width:152px;"><a class="image" href="https://pzwiki.wdka.nl/mw-mediadesign/images/thumb/e/ee/RFID_tag.jpeg/640px-RFID_tag.jpeg"><img alt="" class="thumbimage" decoding="async" src="https://pzwiki.wdka.nl/mw-mediadesign/images/thumb/e/ee/RFID_tag.jpeg/320px-RFID_tag.jpeg"></a> <div class="thumbcaption"><div class="magnify"><a class="internal" href="File:RFID_tag.jpeg.html" title="Enlarge"></a></div>Illustration of an RFID tag</div></div></div>
<h1><span class="mw-headline" id="Reading_files">Reading files</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/mw-mediadesign/index.php?title=User:Simon/Trim4/tools/Python_read_file&amp;action=edit&amp;section=T-1" title="Edit section: ">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
<p>For Python to read a file:
</p>
<pre>with open('README.md', 'r') as txt:
txt_content = txt.read()
print(txt_content)
</pre>
<!--
NewPP limit report
Cached time: 20200617092215
Cache expiry: 86400
Dynamic content: false
CPU time usage: 0.016 seconds
Real time usage: 0.052 seconds
Preprocessor visited node count: 7/1000000
Preprocessor generated node count: 26/1000000
Postexpand include size: 103/2097152 bytes
Template argument size: 0/2097152 bytes
Highest expansion depth: 2/40
Expensive parser function count: 0/100
Unstrip recursion depth: 0/20
Unstrip postexpand size: 89/5000000 bytes
-->
<!--
Transclusion expansion time report (%,ms,calls,template)
100.00% 3.918 1 User:Simon/Trim4/tools/Python_read_file
100.00% 3.918 1 -total
-->
<!-- Saved in parser cache with key wdka_mw_mediadesign-mw_:pcache:idhash:31750-0!canonical and timestamp 20200617092215 and revision id 174176
-->
</div></DOCUMENT_FRAGMENT></div>
</body>
</html>