pyyeti.nastran.bulk.rdsymbols¶
- pyyeti.nastran.bulk.rdsymbols(f, *, encoding='utf_8')[source]¶
Read Nastran logical symbols from a file.
- Parameters:
f (string or file_like or None) – Either a name of a file, or is a file_like object as returned by
open(). If file_like object, it is rewound first. Can also be the name of a directory or None; in these cases, a GUI is opened for file selection.encoding (string; optional) – Encoding to use when opening text file.
- Returns:
symbols (dict) – A dictionary mapping logical symbol names to paths.
Notes
These symbols are typically defined in a ‘nastran.rcf’ configuration file.
They have the format: SYMBOL=<NAME>=’<PATH>’.
Examples
>>> from pyyeti import nastran >>> from io import StringIO >>> f = StringIO("SYMBOL=MODEL_DIR='/home/model_dir'") >>> nastran.rdsymbols(f) {'model_dir': '/home/model_dir'}