B file calls the function in a file, and the value of this function can only be passed through b, but the execution time of a file is wrong.

I have two py files, one for grabbing data, generating Excel is a, and one for emailing the generated Excel to b.
I"m calling an in b now, but a needs a parameter, and I can"t give that parameter in a because it"s given in b.
so an is wrong because there are no parameters defined in a.

this is a code snippet of a whose function requires the code parameter:

def get_content(code):
    arry = None
    code_url = input_code(code)
    urlss = start_url(code_url)
    for url in urlss:
        c = content(url)
        if c != []:
            -sharp print(c)
            z = list(zip(*c))
            -sharp print("get : " + str(z))
            if arry == None:
                arry = z
                print(arry)
            else:
                arry = arry + z
    return arry

def main(code):
    arry = get_content(code)
    param = create_excel()
    workbook = param[0]
    sheet = param[1]
    biaotou = []
    tab_head(sheet,biaotou)
    row = 1
    for i,v in enumerate(arry):
        for j,k in enumerate(v):
            write_excel(sheet,row,j,k)
            file_path = "E:/Anaconda3/project/test/%s.xls" % str(str(arry[0][0]) + "(" + str(arry[0][1]) + ")")
        row += 1
    save_excel(file_path,workbook)
    print("")

this is a code snippet of b, which passes the code parameter:

    for codes in code_eamil:
        cd = codes[0] 
        em = codes[1] 
        for code in cd:
            print(":" + str(code))
            a_gu = "http://quotes.*******.*****.com/trade/%s.html" % str(code) 
            if requests.get(a).status_code == 200:
                a = requests.get(a).text
                try:
                    times = re.search("<tr class=".*?"><td>(.*?)</td>",a_gu_html,re.S).group(1)
                    main(code)
                    print("")

then run time:

Traceback (most recent call last):
  File "E:/Anaconda3/project/test/test.py", line 6, in <module>
    from a_gu.a_gu import main -sharp a_gua_gucontent
  File "E:\Anaconda3\project\test\a_gu\a_gu.py", line 427, in <module>
    main(code)
NameError: name "code" is not defined
May.14,2021
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1eb377e-245e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1eb377e-245e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?