36 lines
640 B
Python
36 lines
640 B
Python
|
#!/usr/bin/python3
|
||
|
#run as python3 frib_rate.py -1 0
|
||
|
#y1 is PAC2
|
||
|
#y is ultimate
|
||
|
|
||
|
import ssl
|
||
|
ssl._create_default_https_context = ssl._create_unverified_context
|
||
|
|
||
|
import sys
|
||
|
import urllib.request
|
||
|
|
||
|
import cgi, cgitb
|
||
|
|
||
|
form = cgi.FieldStorage()
|
||
|
A=form.getvalue('A')
|
||
|
Z=form.getvalue('Z')
|
||
|
I=form.getvalue('I')
|
||
|
|
||
|
print( "Content-type:text/html\r\n\r\n")
|
||
|
|
||
|
#print("==== requesting FRIB rate for A = %s, Z = %s " % (A, Z))
|
||
|
|
||
|
url = "https://groups.nscl.msu.edu/frib/rates/source/frib_yieldY.php?a="+A + "&z=" + Z + "&y=y"
|
||
|
|
||
|
fp = urllib.request.urlopen(url)
|
||
|
|
||
|
list = fp.read().decode("utf8").split(",")
|
||
|
|
||
|
#for haha in list:
|
||
|
# print(haha)
|
||
|
|
||
|
print(list[5])
|
||
|
|
||
|
|
||
|
|