I have a Perl script that helps take in a set of data (accessed from a .dat file with their URLs) and processes them. I would like to change the script to Python, and I was wondering if someone could help me go through it line by line, so that I can change the functions and everything etc. etc. I will attach the script as one of my answers as it is pretty long.
unless (@ARGV==1)
{
exitprint(STDERR, "Usage: today_mjd\n");
}

my $today=(shift(@ARGV));

my $source_file = 'sources.dat';
my $output = ' ';

open (SOURCEFILE," \n".
" ";
}
$sigma = $data[3]/$data[4];
if ($sigma = 4)
{
$sigma = sprintf("%.1f",$sigma);
$source_state = 'Candidate';
$source_rate .= "Sft MJD=$data[0] $data[3] +/- $data[4] ".
"($sigma sigma) \n".
" ";
}
$sigma = $data[5]/$data[6];
if ($sigma = 4)
{
$sigma = sprintf("%.1f",$sigma);
$source_state = 'Candidate';
$source_rate