How to read a directory path from a txt file

Chris Angelico rosuav at gmail.com
Mon Jun 2 10:29:39 EDT 2014


On Tue, Jun 3, 2014 at 12:18 AM, Samuel Kamau <wachkama at gmail.com> 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 ?

This sounds like homework. You'll need to go back to the problem
you've been given, figure out what you're actually trying to
accomplish, and then break that down into several pieces. We're happy
to help you learn, but we will not just do the assignment for you, as
that's counter-productive for all of us.

If it *isn't* homework, please explain in much more detail what it is
you're trying to do here.

ChrisA



More information about the Python-list mailing list