From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: Re: `scm` file parsing(read/write/modify) Date: Mon, 07 Jan 2019 09:22:25 +0100 Message-ID: <87sgy4ri66.fsf@elephly.net> References: <1546844146.671755.1627393640.170B0FDE@webmail.messagingengine.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([209.51.188.92]:48731) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ggQBN-00052T-Ln for help-guix@gnu.org; Mon, 07 Jan 2019 03:22:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ggQBM-0005JG-Uz for help-guix@gnu.org; Mon, 07 Jan 2019 03:22:49 -0500 Received: from sender-of-o53.zoho.com ([135.84.80.218]:21806) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ggQBL-0005IB-Ck for help-guix@gnu.org; Mon, 07 Jan 2019 03:22:48 -0500 In-reply-to: <1546844146.671755.1627393640.170B0FDE@webmail.messagingengine.com> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: "Help-Guix" To: Hamzeh Nasajpour Cc: help-guix@gnu.org Hamzeh Nasajpour 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 =E2=80=9C5 Programming in C=E2=80=9D. -- Ricardo