File tree Expand file tree Collapse file tree 1 file changed +1
-33
lines changed Expand file tree Collapse file tree 1 file changed +1
-33
lines changed Original file line number Diff line number Diff line change @@ -223,39 +223,7 @@ def guess_result_key(filepath: str) -> str:
223223
224224 @staticmethod
225225 def guess_second_key (filepath : str ) -> str :
226- """For files with an h5 or cff second extension, look for the first extension.
227-
228- Parameters
229- ----------
230- filepath :
231- Path to the file.
232-
233- Returns
234- -------
235- str :
236- First extension key name
237-
238- Examples
239- --------
240- Find the first extension key of a result file with multiple extensions keys
241-
242- >>> from ansys.dpf import core as dpf
243- >>> from ansys.dpf.core import examples
244- >>>
245- >>> # Download the result files
246- >>> paths = examples.download_fluent_axial_comp()
247- >>> # Create the DataSources object
248- >>> my_data_sources = dpf.DataSources()
249- >>> # Define the extension key for the file in the given path
250- >>> # We see that the paths are given in a dictionary.
251- >>> # So to choose the correct file you need to give as an argument:
252- >>> # - the list label
253- >>> # - the file index in that list
254- >>> my_file_key = my_data_sources.guess_second_key(filepath=paths["cas"][0])
255- >>> print(my_file_key)
256- cas
257-
258- """
226+ """For files with an h5 or cff second extension, look for the first extension."""
259227 accepted = ["cas" , "dat" ]
260228 without_ext = os .path .splitext (filepath )[0 ]
261229 new_split = os .path .splitext (without_ext )
You can’t perform that action at this time.
0 commit comments