Sunday, May 5, 2024
 Popular · Latest · Hot · Upcoming
3
rated 0 times [  3] [ 0]  / answers: 1 / hits: 536  / 2 Years ago, tue, december 14, 2021, 3:40:28

I finally pulled the trigger, started learning to code python.


It was working just fine yesterday, now it isn't.


Here is what it is doing now-


Script not working in terminal via interpreter(?)


However, I believe there is nothing wrong with the code because Thonny runs it just fine-


SCript working in Thonny


My system info is-


version of ubuntu


All of these shenanigans are occurring on the raspberry pi 4 b w/8gb of ram etc...


I checked out this question over here but frankly I'm so new to this it was mostly over my head. I tried rebooting and power off. This is probably a derp error, but this set of eyes is simply not seeing the painfully obvious problem that seasons devs could spot a mile away.


Please help. Python version running is 3.8.6


More From » python

 Answers
4

Your command line system is already running inside the Python shell.


Your prompt is >>> which is the Python interpreter prompt - you don't execute your Python program directly from that. Type exit(), and it'll drop you back to your normal shell prompt. Then, just run python3 exone.py from there.


[#1977] Wednesday, December 15, 2021, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
variark

Total Points: 82
Total Questions: 114
Total Answers: 122

Location: Sweden
Member since Mon, May 8, 2023
1 Year ago
variark questions
Wed, Nov 3, 21, 13:30, 3 Years ago
Sun, Jan 8, 23, 16:05, 1 Year ago
Thu, Dec 15, 22, 02:10, 1 Year ago
Sun, Jun 26, 22, 12:20, 2 Years ago
Tue, Jun 1, 21, 01:39, 3 Years ago
;