File: io_csv.py

package info (click to toggle)
python-ase 3.26.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 15,484 kB
  • sloc: python: 148,112; xml: 2,728; makefile: 110; javascript: 47
file content (15 lines) | stat: -rw-r--r-- 459 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# creates: io.csv
from ase.io.formats import all_formats, get_ioformat

with open('io.csv', 'w') as fd:
    print('format, description, capabilities', file=fd)
    for format in sorted(all_formats):
        io = get_ioformat(format)
        c = ''
        if io.can_read:
            c = 'R'
        if io.can_write:
            c += 'W'
        if not io.single:
            c += '+'
        print(f':ref:`{format}`, {all_formats[format][0]}, {c}', file=fd)