When I write in my terminal: vim calculator.py
It gives me the following error:
>>> vim calculator.py
File "<stdin>", line 1
vim calculator.py
^^^^^^^^^^
SyntaxError: invalid syntax
How can I solve that this line of code will create a new python file called calculator?
2
Answers
SyntaxErorr
is a python error. You are trying to executevim calculator.py
in a python interpreter.Try to run your command
vim calculator.py
on a command line instead.you did not open a terminal but a Python REPL
open a
cmd
orPowershell
terminalor use the
+
button in the top menu of the Explorer Bar File View