[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: `scm` file parsing(read/write/modify)
From: |
Ricardo Wurmus |
Subject: |
Re: `scm` file parsing(read/write/modify) |
Date: |
Mon, 07 Jan 2019 09:22:25 +0100 |
User-agent: |
mu4e 1.0; emacs 26.1 |
Hamzeh Nasajpour <address@hidden> writes:
> I have a configuration file that written based on `scm` file like as
> `guixSD` config.scm file.
> https://www.gnu.org/software/guix/manual/en/html_node/User-Accounts.html#User-Accounts
>
> I want to read/write/modify this config file in python or C/C++.
> Do you know any `scm` file parsing or any other solution for my needed? In
> fact I want to add/remove/modify parameters of this config file.
The usual way to parse Scheme files is with a Scheme (such as Guile).
If you want to do this from C a somewhat heavy-handed approach could be
to embed Guile in C.
See the Guile manual, section ā5 Programming in Cā.
--
Ricardo