If you came across this error, keep on reading to learn how to fix it. File "<stdin>", line 1 & C:/Users/Chanaka/AppData/Local/Microsoft/WindowsApps/PythonSoftwareFoundation.Python.3.9/python.exe g:/CP/hello_world.py ^ SyntaxError: invalid syntax I got this error for a simple hello world python code. Python files cannot be run within the interpreter. Sounds weird right? Python cannot be run within Python! đ I know why but my thought process is not quite clear. Until I process my thoughts, try THE fix. I wish the error message was descriptive for noobs like me. FIX Type exit() in the Visual Studio Code terminal and press enter, as shown below. Then run the Python file in the terminal. Ta Da! You should not see this error again. Happy Pythoning.
You judged already! Didn't you? If you thought that this blog post is a negative, complaining rant about the cussed behaviour of Sri Lankan bus conductors, you will find me irritating (or wise) at the end of this post. Sri Lankan bus conductors are often criticized for treating passengers as goods and not returning change, among many other 'bad' traits. Is it always true? Are we being judgy? Maybe we should put ourselves in the slippers of a bus conductor to step into the world of bus conducting. For me, being a bus conductor in the over-utilized transport sector is worse than a nightmare. Imagine spending most of the day in often-moving-slow-due-to-traffic? Being a tropical country, we get more than enough sun which peaks at the peak hours which is also the busiest hours for the bus conductors. An over-crowded Sri Lankan bus Let's look at the job description of a bus conductor: Loading passengers to the bus by calling out the destinations Conducting the
Ajahn Brahm, a master of the mind With wisdom deep and thoughts refined His teachings on the path to peace Guide us to release our inner beast With gentle words and a soothing tone He leads us to a place unknown Where suffering and stress depart And a tranquil heart takes its place in our heart He shows us how to live in the present And let go of all that is unpleasant He teaches us to let go of desire And to find true inner fire His guidance helps us to see The beauty and simplicity In every moment of our days And to walk in love and grace So let us follow in his steps And let our hearts and minds be at rest For with Ajahn Brahm as our guide We'll find true peace and joy inside.
Comments