Package sourceinfo :: Module fileinfo

Module fileinfo

source code

pysourceinfo.fileinfo - information on source files.

Based on the stack-frames of inspect, __file__, and additional attributes.

Details see manuals.


Version: 0.1.34

Author: Arno-Can Uestuensoez

Copyright: Copyright (C) 2010-2017 Arno-Can Uestuensoez @Ingenieurbuero Arno-Can Uestuensoez

License: Artistic-License-2.0 + Forced-Fairplay-Constraints

Functions
 
getcaller_filename(spos=1)
Filename of caller's module.
source code
 
getcaller_filepathname(spos=1)
File pathname of caller's module.
source code
 
getcaller_filepathname_rel(spos=1)
File pathname of caller's module relative to sys.path.
source code
 
getcaller_linenumber(spos=1)
Source line number of call.
source code
 
getcaller_linenumber_def(spos=1)
First line number of enclosing caller function/method definition.
source code
 
getcaller_package_filename(spos=1)
Caller position on the stack.
source code
 
getcaller_package_filepathname(spos=1, pmatch=1)
Filepathname of the package from sys.path. If not matched by sys.path returns the dirname of the caller.
source code
 
getcaller_package_pathname(spos=1, pmatch=1)
Pathname of the package from sys.path as used for search of the package. Relies on 'inspect'.
source code
 
getcaller_pathname(spos=1)
pathname of caller source file.
source code
 
getcaller_pathname_rel(spos=1)
Relative pathname to first matching package directory of caller. Evaluates 'sys.path' first, else switches to 'inspect'.
source code
 
getcaller_pathname_sub(spos=1)
sub-pathname to first matching module directory of caller. Evaluates 'sys.path' first, else switches to 'inspect'.
source code
 
getcaller_python_pathname(spos=1)
Alias for getcaller_package_pathname
source code
 
getcaller_source_filepathname(spos=1)
Pathname of caller source.
source code
 
getmodule_filename(mod)
Basename of file for loaded module mod.
source code
 
getmodule_filepathname(mod)
File pathname of loaded module mod.
source code
 
getmodule_package_pathname(mod)
Path name of package for loaded module.
source code
 
getmodule_pathname(mod)
Path name of loaded module.
source code
 
getmodule_pathname_rel(mod, plist=None)
Relative path name to PYTHONPATH for loaded module.
source code
 
getmodule_pathname_sub(mod, plist=None)
Path name for loaded module, relative to package path.
source code
 
getmodule_python_pathname(mod, plist=None)
Path name from PYTHONPATH of loaded module.
source code
Variables
  PYV35Plus = True
  __cached__ = 'b'/local/hd1/home1/data/acue/rd/p-open-deploy/so...
  __loader__ = <_frozen_importlib_external.SourceFileLoader obje...
  __package__ = 'b'sourceinfo''
  __spec__ = ModuleSpec(name='sourceinfo.fileinfo', loader=<_fro...
  __uuid__ = 'b'9de52399-7752-4633-9fdc-66c87a9200b8''
  presolve = 1
Function Details

getcaller_filename(spos=1)

source code 

Filename of caller's module.

Args:
spos:
Caller position on the stack.
Returns:
Returns the filename.
Raises:
pass-through

getcaller_filepathname(spos=1)

source code 

File pathname of caller's module.

Args:
spos:
Caller position on the stack.
Returns:
Returns the file pathname.
Raises:
passed through exceptions

getcaller_linenumber(spos=1)

source code 

Source line number of call.

Args:
spos:
Caller position on the stack.
Returns:
Returns the line number of the parent call.
Raises:
pass-through

getcaller_linenumber_def(spos=1)

source code 

First line number of enclosing caller function/method definition.

Args:
spos:
Caller position on the stack.
Returns:
Returns the first linenumber of the calling functions/method definition.
Raises:
pass-through

getcaller_package_filename(spos=1)

source code 
Args:
spos:
Caller position on the stack.
Returns:
Returns the file name of the package.
Raises:
pass-through

getcaller_package_filepathname(spos=1, pmatch=1)

source code 

Filepathname of the package from sys.path. If not matched by sys.path returns the dirname of the caller.

Args:
spos:
Caller position on the stack.
Returns:
Returns the file path name of the package.
Raises:
pass-through

getcaller_package_pathname(spos=1, pmatch=1)

source code 

Pathname of the package from sys.path as used for search of the package. Relies on 'inspect'.

Args:
spos:
Caller position on the stack.__
Returns:
Returns the path name to the package.
Raises:
pass-through

getcaller_pathname(spos=1)

source code 

pathname of caller source file.

Args:
spos:
Caller position on the stack.
Returns:
Returns the filename.
Raises:
pass-through

getcaller_pathname_rel(spos=1)

source code 

Relative pathname to first matching package directory of caller. Evaluates 'sys.path' first, else switches to 'inspect'.

Args:
spos:
Caller position on the stack.
Returns:
Returns the path name to the package.
Raises:
pass-through

getcaller_pathname_sub(spos=1)

source code 

sub-pathname to first matching module directory of caller. Evaluates 'sys.path' first, else switches to 'inspect'.

Args:
spos:
Caller position on the stack.
Returns:
Returns the path name to the package.
Raises:
pass-through

getcaller_python_pathname(spos=1)

source code 

Alias for getcaller_package_pathname

Args:
spos:
Caller position on the stack.
Returns:
Returns the name of caller module.
Raises:
passed through exceptions

getcaller_source_filepathname(spos=1)

source code 

Pathname of caller source.

Args:
spos:
Caller position on the stack.
Returns:
Returns the file pathname of the source for the caller, else None.
Raises:
pass-through

getmodule_filename(mod)

source code 

Basename of file for loaded module mod.

Args:
mod:
Reference to a loaded module.
Returns:
Returns the basename of the loaded module.
Raises:
pass-through

getmodule_filepathname(mod)

source code 

File pathname of loaded module mod.

Args:
mod:
Reference to a loaded module.
Returns:
Returns the file pathname of the loaded module.
Raises:
pass-through

getmodule_package_pathname(mod)

source code 

Path name of package for loaded module.

Args:
mod:
Reference to a loaded module.
Returns:
Returns the pathname of the package.
Raises:
pass-through

getmodule_pathname(mod)

source code 

Path name of loaded module.

Args:
mod:
Reference to a loaded module.
Returns:
Returns the pathname of the loaded module.
Raises:
pass-through

getmodule_pathname_rel(mod, plist=None)

source code 

Relative path name to PYTHONPATH for loaded module.

Args:
mod:
Reference to a loaded module.
Returns:
Returns the relative pathname of the loaded module.
Raises:
pass-through

getmodule_pathname_sub(mod, plist=None)

source code 

Path name for loaded module, relative to package path.

Args:
mod:
Reference to a loaded module.
Returns:
Returns the sub pathname of the loaded module.
Raises:
pass-through

getmodule_python_pathname(mod, plist=None)

source code 

Path name from PYTHONPATH of loaded module.

Args:
mod:
Reference to a loaded module.
Returns:
Returns the pathname of the loaded module.
Raises:
pass-through

Variables Details

__cached__

Value:
'b'/local/hd1/home1/data/acue/rd/p-open-deploy/sourceinfo/repos/source\
forge.net/pysourceinfo-code/sourceinfo/__pycache__/fileinfo.cpython-38\
.pyc''

__loader__

Value:
<_frozen_importlib_external.SourceFileLoader object at 0x7f1b8822a5e0>

__spec__

Value:
ModuleSpec(name='sourceinfo.fileinfo', loader=<_frozen_importlib_exter\
nal.SourceFileLoader object at 0x7f1b8822a5e0>, origin='/local/hd1/hom\
e1/data/acue/rd/p-open-deploy/sourceinfo/repos/sourceforge.net/pysourc\
einfo-code/sourceinfo/fileinfo.py')