I am trying to learn how to call one .py script from another.
I have a python script 'hiya.py'. This contains only one line:- print('hello you'). From the terminal the command python3 hiya.py displays 'hello you'. So i have another script 'doit.py' which has two lines:-
import hiya.py
python3 hiya.py
This doesn't work. So if I turn the code in 'hiya.py' into:-
def writit():
print('hello you')
return
and change 'doit' to:-
import hiya.py
writit()
it still doesn't work.
So would some kind person give me the code that would work?