<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif;">
<div>Most filters would have to do something like Andy suggests, but the Exodus reader just so happens to have the ability to find all relevant files if you point to the first one (for historical reasons). So using the following should work:</div>
<div><br>
</div>
<div>
<div style="font-family: Calibri; font-size: 15px;">z_pinch1exo8 = ExodusIIReader(FileName='z_pinch1.exo.8.0')</div>
</div>
<div><br>
</div>
<div>-Ken</div>
<div><br>
</div>
<span id="OLK_SRC_BODY_SECTION">
<div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<span style="font-weight:bold">From: </span>Andy Bauer <<a href="mailto:andy.bauer@kitware.com">andy.bauer@kitware.com</a>><br>
<span style="font-weight:bold">Date: </span>Wednesday, January 7, 2015 at 7:34 AM<br>
<span style="font-weight:bold">To: </span>Walter Scott <<a href="mailto:wascott@sandia.gov">wascott@sandia.gov</a>><br>
<span style="font-weight:bold">Cc: </span>"<a href="mailto:paraview@paraview.org">paraview@paraview.org</a>" <<a href="mailto:paraview@paraview.org">paraview@paraview.org</a>><br>
<span style="font-weight:bold">Subject: </span>[EXTERNAL] Re: [Paraview] Parallel reads in ParaView<br>
</div>
<div><br>
</div>
<div>
<div>
<div dir="ltr">
<div>
<div>
<div>
<div>
<div>
<div>Hi Alan,<br>
<br>
</div>
I'm thinking it may be easiest to let Python do the heavy lifting on this to figure out the files to read in. You can use glob from the glob module and then sort the files. So that would look like:<br>
=======<br>
</div>
import glob<br>
</div>
files = glob.glob("z_pinch*")<br>
</div>
files.sort() # if the order of the files isn't important you can probably skip this<br>
========<br>
<br>
</div>
You can use more advanced regex's in the glob() method to get pickier about the desired files, do a bit of playing around with sort() to get non-default sorting and then play with the list to get the files you want from them like the last 4 files.<br>
<br>
</div>
Cheers,<br>
Andy<br>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Tue, Jan 6, 2015 at 10:12 PM, Scott, W Alan <span dir="ltr">
<<a href="mailto:wascott@sandia.gov" target="_blank">wascott@sandia.gov</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><font face="Calibri"><span style="font-size:11pt">
<div>I have a user that is trying to write a python script that reads in a dataset with a large number of files (say hundreds to thousands of files). The dataset is Exodus. This user wants to read in a large number of these datasets (dozens to hundreds),
with each dataset comprised of a different number of individual files than the other datasets. Thus, he doesn’t want to read in files like this (example, only 8 files):</div>
<div> </div>
<div>z_pinch1exo8 = ExodusIIReader(FileName=['z_pinch1.exo.8.0', 'z_pinch1.exo.8.1', z_pinch1.exo.8.2', 'z_pinch1.exo.8.3', 'z_pinch1.exo.8.4', 'z_pinch1.exo.8.5', 'z_pinch1.exo.8.6', 'z_pinch1.exo.8.7'])</div>
<div> </div>
<div> </div>
<div>But would rather like this:</div>
<div>z_pinch1exo8 = ExodusIIReader(FileName=['z_pinch1.exo.8.*’])</div>
<div>or</div>
<div>z_pinch1exo8 = ExodusIIReader(FileName=['z_pinch1.exo.”totalFileCount”.*’])</div>
<div> </div>
<div> </div>
<div>Is this possible in Python? What is the format?</div>
<div> </div>
<div>If the user wants to window into his data, say take the last 4 files, is this possible?
</div>
<div> </div>
<div>Thanks,</div>
<span class="HOEnZb"><font color="#888888">
<div> </div>
<div>Alan</div>
<div> </div>
<div> </div>
<div> </div>
</font></span></span></font></div>
<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">
http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" target="_blank">
http://paraview.org/Wiki/ParaView</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=ParaView" target="_blank">
http://markmail.org/search/?q=ParaView</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/paraview" target="_blank">http://public.kitware.com/mailman/listinfo/paraview</a><br>
<br>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</span>
</body>
</html>