pygmt.clib.Session.inquire_virtualfile

Session.inquire_virtualfile(vfname)[source]

Get the family of a virtual file.

Parameters:

vfname (str) – Name of the virtual file to inquire.

Return type:

int

Returns:

family – The integer value for the family of the virtual file.

Examples

>>> from pygmt.clib import Session
>>> with Session() as lib:
...     with lib.virtualfile_out(kind="dataset") as vfile:
...         family = lib.inquire_virtualfile(vfile)
...         assert family == lib["GMT_IS_DATASET"]