3
5Ad]™  ã               @   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 k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   úz/home/yuhw/wc/wire-cell-python/wcpy/lib/python3.6/site-packages/mayavi-4.7.1-py3.6-linux-x86_64.egg/mayavi/scripts/util.pyÚget_data_dir   s    


r   )Ú__doc__r	   Úos.pathr   r   r   r   r   r   r   r   r   Ú<module>   s   