← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #287693]: Print line

 

Question #287693 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/287693

    Status: Open => Answered

Karl proposed the following answer:
Please read similar questions. The following is adapted from
https://answers.launchpad.net/sikuli/+question/194222 Comment #4.

import traceback
def getCurrentLineNumberWithTraceback():
    return traceback.extract_stack(limit = 2)[0][1]

Usage:
print getCurrentLineNumberWithTraceback()

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.