[Tutor] how do i open picture files without knowing the file name?

Michael C mysecretrobotfactory at gmail.com
Tue May 16 16:01:13 EDT 2017

i ll look into it! thx for now!

On Tue, May 16, 2017 at 12:51 PM, Alan Gauld via Tutor <tutor at python.org>

> On 16/05/17 19:49, Michael C wrote:
> > I am running this code so I can do some image manipulation with them.
> > The thing is, I have a lot of pictures to go through, so I can't type the
> > file names
> Do you know the folder where they live?
> If so os.listdir() will give you a list of filenames.
> If there are subfolders then os.walk() will traverse them.
> If you don't understand that come back with more specific
> questions about what puzzles you and we will expand
> as necessary.
> --
> Alan G
> Author of the Learn to Program web site
> http://www.alan-g.me.uk/
> http://www.amazon.com/author/alan_gauld
> Follow my photo-blog on Flickr at:
> http://www.flickr.com/photos/alangauldphotos
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> https://mail.python.org/mailman/listinfo/tutor

More information about the Tutor mailing list