How to insert links in Python

后端 未结 3 857
耶瑟儿~
耶瑟儿~ 2021-01-06 18:39

Is it possible to add links into the Python script and print it out to the terminal/console? Like in HTML; once it was clicked, we will be redirected to the URL. (I\'m on Li

3条回答
  •  再見小時候
    2021-01-06 19:01

    Yes it is possible here is a simple python cgi script that does what you describe.

    print "Content-type: text/html"
    print
    
    print """
    
    Sample
    
    google
    
    """
    

    you can learn more about cgi here http://en.wikipedia.org/wiki/Common_Gateway_Interface

提交回复
热议问题