Filepath - not able read file


#1

Hi, I’m new user on c9.

I’ve file which is created in my working directory i.e test.csv

when I try to read that file, lets say

f = open(’/test.csv’)

print(f.read())

it gives me error IOError: [Errno 2] No such file or directory: ‘/test.csv’

It should be very straight forward but seems like I cant access the files from my directory - do I need to give any other path - any help on this would be greatly appreciated !


#2

Never mind, I figured out. Path should be “/home/ubuntu/workspace/test.csv”