creating hyperlinks in python

后端 未结 3 1933
孤街浪徒
孤街浪徒 2020-12-06 18:54

I have a log file in which some test commands and their status (Pass/Fail) are logged using python. Now I want that test commands should not be written as simple text but sh

3条回答
  •  一个人的身影
    2020-12-06 19:52

    You seem to be a bit confused about what a hyperlink, well, is.

    A text file is a file containing text. (It's simple, but it needs to be said!) It doesn't have pictures, animations, colours, headers, or anything like that. It's just text.

    Since people often want more data with their text (x should be a heading, y should be red, z should make a funny cursor when you mouse over it), there are many schemes for encoding data about text. For example, Markdown is a text format used by StackOverflow. HTML is a markup language (a way of annotating text) that uses elements. It's useful because web browsers can take HTML pages as input and display them graphically.

    A hyperlink as you describe it is a graphical element such as you might find on a website. You can't have them in a text file, because a text file is just text. But you can instruct a web browser to display a hyperlink by writing

    text of the link
    

    If you open a file containing that in a web browser, it will display the text as a link. Note that files containing HTML are conventionally called something.html to indicate their contents, and that there are a bunch of required tags in any HTML document ().

提交回复
热议问题