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 should be written as hyperlinks. So that when I click on them another files which are linked to them are opened.
For e.g:
file = open("C:/logfile.log", "w")
file.write("[Command Name - '%35s'] [PASSED]
" %(CommandName))
file.close()
file1 = open("C:/TestCommand.log/", "w")
file1.write("'%35s
" %(str(parameter_val_for_test_command)))
file1.close()
Now I want that the CommandName written in logfile.log should be a hyperlink for the file TestCommand.log So that when I click on the CommandName the file TestCommand.log opens.
Can you please suggest how should I do create a logfile.log with hyperlinked CommandName and then how should I link this hyperlinked CommandName to the file TestCommand.log??
See Question&Answers more detail:os