a
    «ˆc™  ã                   @   s0   d Z ddlZddlmZmZmZmZ dd„ ZdS )zˆ This module collects utility code that does not import any
significant envisage/mayavi code but is useful for scripts that use
mayavi.
é    N)ÚjoinÚabspathÚdirnameÚisdirc                 C   s^   dt jd v rLtdƒrdS t jd }ttt|ƒƒdƒ}t|ƒrB|S tdƒ‚ntt| ƒdƒS dS )z¶ Get the data directory while running an example script.

        Parameters:
        -----------
        example_filename: Path
            absolute path of the example script

    Zmayavi2r   Údataéÿÿÿÿz&Run example from the example directoryN)ÚsysÚargvr   r   r   r   Ú	Exception)Zexample_filenameÚfilenameÚdir_name© r   úV/home/yuhw/wc/wire-cell-python/wcpy/lib/python3.9/site-packages/mayavi/scripts/util.pyÚget_data_dir   s    


r   )Ú__doc__r   Úos.pathr   r   r   r   r   r   r   r   r   Ú<module>   s   