Invalid syntax when trying to run a program that takes arguments

12 views
Skip to first unread message

Victor

unread,
Sep 12, 2022, 1:46:35 PM9/12/22
to spyder
I am using Windows 11 with Spyder

I am trying to run this: python dna.py ./databases/small.csv ./sequences/1.txt

That works when I run it inside an Ubuntu shell.

Inside Spyder I get:
python dna.py ./databases/small.csv ./sequences/1.txt
           ^
SyntaxError: invalid syntax

When I modify the path to match the Windows convention I get the same error:
python dna.py \databases\small.csv \sequences\1.txt
           ^
SyntaxError: invalid syntax

What does Spyder want from me? How can I get it to take arguments, specifically traverse outside root directory to fetch the required files?

Reply all
Reply to author
Forward
0 new messages