Jan-23-2024, 09:19 AM
This little Python:
Make sure the script and the bash script are executable. I have the path for my bash scripts in my $PATH, /home/pedro/myBashscripts, so bash always finds them.
Don't forget the shebang: /usr/bin/python3 or bash and the computer go very weird!
#! /usr/bin/python3 #This program says hello and asks for your name. print('This is Python speaking: Hello World') print('What is your name?') #Ask for their name. myName = input() print('It is good to meet you,' + myName)can run in bash by creating a bash script like this:
Quote:echo "This is bash speaking, I am now starting hello_world.py"
myPython/helloWorld.py
Make sure the script and the bash script are executable. I have the path for my bash scripts in my $PATH, /home/pedro/myBashscripts, so bash always finds them.
Don't forget the shebang: /usr/bin/python3 or bash and the computer go very weird!