簡體   English   中英

python中的可點擊html鏈接

[英]clickable html links in python

我正在尋找一種使鏈接可點擊的方法。 我正在使用 python 2.7.9 並編寫了一個程序來幫助我的學生。 他們寫作的每個指標都附有一個鏈接以供進一步幫助。 現在,它們只是打印出來的,學生需要復制和粘貼文件。 我如何使它們可點擊。 在另一個窗口中打開會很理想,但我真的只想打開鏈接。

舉個例子:

tx="# of pronouns"
        t1=iTest["pro"]
        t2=round(100*t1/number_of_words,1)
        tc='''      
                    You are not to use inclusive pronouns
                    in academic writing.
                    Please go to http://owll.massey.ac.nz/academic-writing/1st-vs-3rd-person.php to review.'''
        row="<tr><td ><pro>"+tx+"</pro></td> <td>"+str(t1)+"</td> <td>"+str(t2)+"%</td> <td>"+tc+"</td>"
        if t1>0: fo.writelines(row) #only print this row if there are personal pronouns

你想實現這樣的目標:

 <a href="http://owll.massey.ac.nz/academic-writing/1st-vs-3rd-person.php"> http://owll.massey.ac.nz/academic-writing/1st-vs-3rd-person.php </a>

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM