sys._getframe.f_locals.get

Here are the examples of the python api sys._getframe.f_locals.get taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

5 Examples 7

Example 1

Project: cgstudiomap
Source File: testutils.py
View license
def printLocation(depth=1):
    if sys._getframe(depth).f_locals.get('__name__')=='__main__':
        outDir = outputfile('')
        if outDir!=_OUTDIR:
            print('Logs and output files written to folder "%s"' % outDir)

Example 2

Project: web2py-appreport
Source File: testutils.py
View license
def printLocation(depth=1):
    if sys._getframe(depth).f_locals.get('__name__')=='__main__':
        outDir = outputfile('')
        if outDir!=_OUTDIR:
            print 'Logs and output files written to folder "%s"' % outDir

Example 3

Project: web2py-appreport
Source File: testutils.py
View license
def printLocation(depth=1):
    if sys._getframe(depth).f_locals.get('__name__')=='__main__':
        outDir = outputfile('')
        if outDir!=_OUTDIR:
            print 'Logs and output files written to folder "%s"' % outDir

Example 4

Project: ReportLab
Source File: testutils.py
View license
def printLocation(depth=1):
    if sys._getframe(depth).f_locals.get('__name__')=='__main__':
        outDir = outputfile('')
        if outDir!=_OUTDIR:
            print 'Logs and output files written to folder "%s"' % outDir

Example 5

Project: ReportLab
Source File: testutils.py
View license
def printLocation(depth=1):
    if sys._getframe(depth).f_locals.get('__name__')=='__main__':
        outDir = outputfile('')
        if outDir!=_OUTDIR:
            print 'Logs and output files written to folder "%s"' % outDir