Article 4SA5Z call Python from a bash script

call Python from a bash script

by
Pedroski
from LinuxQuestions.org on (#4SA5Z)
With some very kind help from here, I managed to get rsync working for me from a bash script.

rsync fetches simple text files (homework answers) from my webpage and puts them on my laptop.

After that, still in bash, I change directory and call 2 Python programs.

Python 1: The first one marks the answers and puts the results in an Excel sheet.

Python2: The second one puts the latest results in my attendance + scores Excel table against the name of each student, for each class. It also calculates total scores, percent scores, does some formatting to make everything look nice.

Everything is working perfectly, just how I want it.

I would like to extend the simple rsync script to call Python 1 and Python 2 in sequence. Do everything in one fell swoop.

The path to my Python is: /home/pedro/myPython/

How can I call my Python programs in the script which fetches the text files?

Will bash run them OK?

If I put, after the rsync line:

$pathPython1 = "/home/pedro/myPython/Python1.py"
$pathPython2 = "/home/pedro/myPython/Python2.py"

How do I make them run?latest?d=yIl2AUoC8zA latest?i=CF-Ch-SZTaA:UlMgrQZXq14:F7zBnMy latest?i=CF-Ch-SZTaA:UlMgrQZXq14:V_sGLiP latest?d=qj6IDK7rITs latest?i=CF-Ch-SZTaA:UlMgrQZXq14:gIN9vFwCF-Ch-SZTaA
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments