ReadLine Function - Tikolu/SETTI GitHub Wiki

The ReadLine function can be used to get one line of a page.

Usage

setti.ReadLine(page, line)

page - the page from which you want the line to be taken, if not specified, will target the main page

line - which line of the page you want to get

The ReadLine command will return the line line of the page page. Note that computers start counting from 0, so inputing 0 would output the first line, 1 the second, 2 the third and so on.

Entering -1 as the line will get the last line of the page.

Examples

print(setti.ReadLine("usavictor",7))

Prints out the eight line of the page http://htwins.net/edit/usavictor to the console.


num1 = setti.ReadLine("numbers",0)
num2 = setti.ReadLine("numbers",1)
output = int(num1) * int(num2)
print(output)

Multiplies the first and second lines of http://htwins.net/edit/numbers together, and prints the result out to the console.


while True:
     if setti.ReadLine("precious",-1)) = "Do not edit this line!":
          print("The line has been editted!")

Continuously checks if the last line of http://htwins.net/edit/precious is editted and alerts the user. However, it won't alert if any other line is changed.