# sexpdata -rw-r--r-- 717 bytes View raw
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
>>> from sexpdata import loads
>>> f = open("manifest.scm")
>>> text = f.read()
>>> text
'(specifications->manifest\n  \'("python-flask"\n    "python-jinja2"\n    ;; "python-ansi2html"\n    ;; "python-giturlparse" Get this dep from guix-bioinformatics\n    ;; "python-dotenv"\n    ;; "python-tinydb"\n
"python-requests" \n    "python-pygithub"\n    "python-gitpython"))\n\n'
>>> loads(text)
[Symbol('specifications->manifest'), Quoted(['python-flask', 'python-jinja2', 'python-requests', 'python-pygithub', 'python-gitpython'])]
>>> manifest = loads(text)
>>> manifest = manifest[1]
>>> for package in manifest:
...   package
...
'python-flask'
'python-jinja2'
'python-requests'
'python-pygithub'
'python-gitpython'