[Paraview] How to get the folder of the active source

Cory Quammen cory.quammen at kitware.com
Sun Dec 6 23:36:49 EST 2015


Matheus,

activeSource.FileName

will get you the path to the file. This ought to work for most file readers.

os.path.dirname(activeSource.FileName)

will get you the directory.

HTH,
Cory

On Sun, Dec 6, 2015 at 11:05 PM, Matheus Viana <vianamp at gmail.com> wrote:

> Hi list.
>
> I was wondering whether it is possible to determine the folder where the
> active source was loaded from in a Python script.
>
> Thanks,
>
> *Matheus Viana*
> *Postdoctoral Research Employee*
> *Developmental and Cell Biology*
> *University of California Irvine*
>
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ParaView Wiki at:
> http://paraview.org/Wiki/ParaView
>
> Search the list archives at: http://markmail.org/search/?q=ParaView
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/paraview
>
>


-- 
Cory Quammen
R&D Engineer
Kitware, Inc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20151206/a9cdb051/attachment.html>


More information about the ParaView mailing list