bcdet,
tried both still kicks out same error:
File "./Documents/Python/Samples/foo.py", line 3
print ?foo?
^
SyntaxError: invalid syntax
not recognizing the "
thanks
User Profile
Collapse
-
used both single quote and double quote (not both at same time) both result in same error:
case 1:
#! /usr/bin/env python
#encoding:latin-1
print ‘foo’
dans-air:~ dan$ python ./Documents/Python/Samples/foo.py
File "./Documents/Python/Samples/foo.py", line 3
print ?foo?
^
SyntaxError: invalid syntax
case 2:
#! /usr/bin/env...Leave a comment:
-
invalid syntax printing string from file
running 2.7.5
on Mac
from the command prompt --
>>> Print "foo"
foo
works fine.
from script file
--
#! /usr/bin/env python
#encoding:latin-1
print “foo”
--
get following error:
dans-air:~ dan$ python ./Documents/Python/Samples/foo.py
File "./Documents/Python/Samples/foo.py", line 3
...
No activity results to display
Show More
Leave a comment: