I am getting SyntaxError:
EOL while scanning string literal in this part.
system.cpu.workload = LiveProcess(cmd = 'hello’, executable ='hello')
Why is this happening?
I am getting SyntaxError:
EOL while scanning string literal in this part.
system.cpu.workload = LiveProcess(cmd = 'hello’, executable ='hello')
Why is this happening?
Problem is you're using different types of quotes around hello
(cmd = 'hello’
). One on the left is ASCII single quote and other one is RIGHT SINGLE QUOTATION MARK
.
>>> 'hello’File "<ipython-input-56-3231cc2cf7bf>", line 1'hello’^
SyntaxError: EOL while scanning string literal>>> 'hello'
'hello'
’
is actually a unicode character:
>>> "’".decode('utf-8')
u'\u2019'