[Paraview] How to get the folder of the active source
Matheus Viana
vianamp at gmail.com
Mon Dec 7 00:00:18 EST 2015
Thanks Cory.
Exactly what I wanted.
-m
*Matheus Viana*
*Postdoctoral Research Employee*
*Developmental and Cell Biology*
*University of California Irvine*
2015-12-07 2:36 GMT-02:00 Cory Quammen <cory.quammen at kitware.com>:
> 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/20151207/9bf6a3ca/attachment.html>
More information about the ParaView
mailing list