1

Hi does anyone know why I have an error here underneath the t ?:

SyntaxError: invalid syntax File "'scriptmanager'", line 3 filepath = r '/Users/luke/Documents/water.numbers.csv' ^
SyntaxError: invalid syntax

regards,

import c4d

filepath = r '/Users/luke/documents/water.numbers.csv'

fileobj = (filepath, 'r')

print fileobj.readline ()

Vertexwahn
  • 7,709
  • 6
  • 64
  • 90

1 Answers1

0

Is what you want this?

1 import c4d
2 
3 filepath = r'/Users/luke/documents/water.numbers.csv'
4             ^
5 fileobj = open(filepath, 'r')
6           ^^^^
7 print fileobj.readline()
                        ^
  • You had a space between "r" and "'" after "filepath =" which I think would make trouble (line 3).
  • You were missing the 'open' for creating a file object (line 5.
  • I think Python probably also won't like the space between "readline" and "()" (line 7).
Tom Barron
  • 1,554
  • 18
  • 23