Training, Open Source computer languages

PerlPHPPythonMySQLhttpd / TomcatTclRubyJavaC and C++LinuxCSS

Search our site for:
Home Accessibility Courses Diary The Mouth Forum Resources Site Map About Us Contact

Tips and short articles on this subject
Reading a file multiple times - file pointers
The elegance of Python
Relative or absolute milkman
Well House Consultants
You are on the site of Well House Consultants who provide Open Source Training Courses and business hotel accommodation. You are welcome to browse and use our resources subject to our copyright statement and to add in links from your pages to ours.
Other subject areas - resources
Java Resources
Well House Manor Resources
Perl Resources
Python Resources
PHP Resources
Object Orientation and General topics
MySQL Resources
Linux / LAMP / Tomcat Resources
Well House Consultants Resources
Extras Resources
C and C++ Resources
Ruby Resources
Tcl/Tk Resources
Web and Intranet Resources
File Handling - Python module Y110
How to open a file in Python and how to read it line by line into a string, or all at once, into a list. Also how to overwrite a file or add to an existing file, and how to check existing files on your file system.

This topic is presented on public course Python Programming

Examples from our training material
coster.py   Read whole file, report on lines matching a pattern
costhuge.py   Reading a file line by line
dmoz.py   Parsing a large file, looking for matching lines
dsa   polymorphism in action
fff   Jumping around an input file (random access)
fgfg   Improved version - program to handle data recently appended to a log file
filechex   File checks - is it a directory, when was it modified
grabpage.py   Read from a URL as is reading from a file
lost.py   Trapping a non-existant file error
n2   Find the title of a web site
pinorder.py   List a directory sorted by age of object
pstat.py   Checking whether a file exists, and things about it ...
tablog.py   File overwrite and append in python
Opentalk forum discussions related to this topic
Running shell commands from Python
Huge files in Python over 4 Gbytes
Pictures
Writing a Python program
Background information
Some modules are available for download as a sample of our material or under an Open Training Notes License for free download from http://www.training-notes.co.uk.
Topics covered in this module
Opening and reading from files.
Writing files.
File system checks.
Reading a web page.
Course links
The following web pages are used as references / examples in this module

[Link] Adieu, plancher des vaches! (1999)
(at http://us.imdb.com/Title?0205725)

[Link] OUWO - Oxford University Wind Orchestra : Player Resources
(at http://users.ox.ac.uk/~ouwo/)

[Link] The Bate Collection of Musical Instruments
(at http://www.ashmol.ox.ac.uk/BCMIPage.html)

[Link] Oxford Bach Choir
(at http://users.ox.ac.uk/~azzopard/obc.html)

[Link] Saïd Business School : Home
(at http://www.sbs.ox.ac.uk)

[Link] Department of Social Policy and Social Work.
(at http://marx.apsoc.ox.ac.uk/)

[Link] Homepage: Department of Sociology, University of Oxford
(at http://www.sociology.ox.ac.uk/)

[Link] INACCESSIBLE
(at http://www.orinst.ox.ac.uk/ics/chinese.htm)

[Link] Home page
(at http://www.crim.ox.ac.uk/)

[Link] Centre for Teaching Chinese as a Foreign Language, University of Oxford
(at http://www.ctcfl.ox.ac.uk/)

[Link] Department of Politics and International Relations
(at http://www.politics.ox.ac.uk/)

[Link] Centre for the Study of African Economies, Home Page
(at http://www.csae.ox.ac.uk/)

[Link] Oxford University Department of Educational Studies
(at http://www.edstud.ox.ac.uk/)

[Link] Taylor Institution Library
(at http://www.taylib.ox.ac.uk/)

[Link] INACCESSIBLE
(at http://cebmh.warne.ox.ac.uk/cebmh/elmh/depression/guide/page1-catalan.html)

[Link] Vasco Mousinho de Quevedo Castelo Branco
(at http://users.ox.ac.uk/~kebl0779/quevedo/)

[Link] Swift
(at http://www.hertford.ox.ac.uk/alumni/swift.htm)

[Link] Sheep Bingo!
(at http://www.sheepbingo.co.uk)

[Link] Perl.com: The Source for Perl -- perl development, perl conferences
(at http://www.perl.com)

[Link] PHP: Hypertext Preprocessor
(at http://www.php.net)

[Link] MySQL: The World's Most Popular Open Source Database
(at http://www.mysql.com)

[Link] Tcl Developer Site
(at http://www.tcl.tk)

We check these links from time to time with a spider written in PHP. Latest full check was on Saturday, 12th June 2004. Titles are extracted from the web pages listed.

Complete learning
If you are looking for a complete course and not just a information on a single subject, visit our Listing and schedule page.

Well House Consultants specialise in training courses in Python, Perl, PHP, and MySQL. We run Private Courses throughout the UK (and beyond for longer courses), and Public Courses at our training centre in Melksham, Wiltshire, England. It's surprisingly cost effective to come on our public courses - even if you live in a different country or continent to us.

We have a technical library of over 600 books on the subjects on which we teach. These books are available for reference at our training centre. Also available is the Opentalk Forum for discussion of technical questions.



See also:

© WELL HOUSE CONSULTANTS LTD., 2008: Well House Manor • 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01144 1225 708225 • FAX: 01144 1225 707126 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho