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:

Taku
  • 31,927
  • 11
  • 74
  • 85
  • 2
    ie. `open()` is only for use on files, not directories. – R Nar Nov 16 '15 at 19:43
  • 1
    you can instead make use of [`import os`](https://docs.python.org/2/library/os.html#files-and-directories) – R Nar Nov 16 '15 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. http://stackoverflow.com/a/18262324/3027854 – Vikash Singh Nov 16 '15 at 19:49

0 Answers0