1

I'm trying to make a simple code that simply opens a directory with this code

openFile = open('FileName', 'r+')

I've made sure i have permissions to read and write to this directory but i keep getting the error Permission Error: [Errno 13] Permission denied:

3
  • 2
    ie. open() is only for use on files, not directories.
    – R Nar
    Nov 16, 2015 at 19:43
  • 1
    you can instead make use of import os
    – R Nar
    Nov 16, 2015 at 19:44
  • as R Nar pointed out. open is for opening files not directories. Refer to this post on how to read files inside folder. stackoverflow.com/a/18262324/3027854 Nov 16, 2015 at 19:49

0

Browse other questions tagged or ask your own question.