How to read a directory path from a txt file

Mark Lawrence breamoreboy at yahoo.co.uk
Mon Jun 2 10:44:42 EDT 2014


On 02/06/2014 15:18, Samuel Kamau wrote:
> I have created a txt file with various paths to directories. The paths look like this
> /home/wachkama/Desktop/api/genshi
> /home/wachkama/Desktop/www/portal/schedule
> /home/wachkama/Desktop/show/help.genshi
>
> How do i read this paths in python ?
>

https://docs.python.org/3/library/functions.html#open
https://docs.python.org/3/tutorial/inputoutput.html#reading-and-writing-files

-- 
My fellow Pythonistas, ask not what our language can do for you, ask 
what you can do for our language.

Mark Lawrence

---
This email is free from viruses and malware because avast! Antivirus protection is active.
http://www.avast.com





More information about the Python-list mailing list