if the value is not found the default value is returned.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14556
a592a061-630c-0410-9148-
cb99ea01b6c8
-def get_value(lines, token, start, end = 0):
- """ get_value(lines, token, start[, end]) -> list of strings
+def get_value(lines, token, start, end = 0, default = ""):
+ """ get_value(lines, token, start[[, end], default]) -> list of strings
Return tokens after token for the first line, in lines, where
token is the first element."""
Return tokens after token for the first line, in lines, where
token is the first element."""
if len(lines[i].split()) > 1:
return lines[i].split()[1]
else:
if len(lines[i].split()) > 1:
return lines[i].split()[1]
else:
def del_token(lines, token, start, end):
def del_token(lines, token, start, end):