skidl.scriptinfo module

Routines for getting information about a script.

skidl.scriptinfo.get_script_name()[source]

Return the name of the top-level script.

skidl.scriptinfo.get_skidl_trace()[source]

Return a list containing the source line trace where a SKiDL object was instantiated.

skidl.scriptinfo.scriptinfo()[source]

Returns a dictionary with information about the running top level Python script: ————————————————————————— dir: directory containing script or compiled executable name: name of script or executable source: name of source code file ————————————————————————— name and source are identical if and only if running interpreted code. When running code compiled by py2exe or cx_freeze, source contains the name of the originating Python script. If compiled by PyInstaller, source contains no meaningful information.

Downloaded from: http://code.activestate.com/recipes/579018-python-determine-name-and-directory-of-the-top-lev/