I've been trying to run some code in Spyder using their idle, but I keep getting an error such as SyntaxError: invalid syntax. Assuming that the file requires 2 inputs, for example, img1.bmp, and an integer (ie python file.py img1.bmp 4).
The idle is a python interpreter, and it is giving you a python error SyntaxError: invalid syntax
. You are already running python, so entering python file.py img1.bmp 4
would not make any sense. You would need to run that in a command prompt. If you want to run it in a python interpreter, you could import your file and call the functions as needed.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.