unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Ricardo Wurmus <rekado@elephly.net>
To: Hamzeh Nasajpour <h.nasajpour@pantherx.org>
Cc: help-guix@gnu.org
Subject: Re: `scm` file parsing(read/write/modify)
Date: Mon, 07 Jan 2019 09:22:25 +0100	[thread overview]
Message-ID: <87sgy4ri66.fsf@elephly.net> (raw)
In-Reply-To: <1546844146.671755.1627393640.170B0FDE@webmail.messagingengine.com>


Hamzeh Nasajpour <h.nasajpour@pantherx.org> 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

      reply	other threads:[~2019-01-07  8:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-07  6:55 `scm` file parsing(read/write/modify) Hamzeh Nasajpour
2019-01-07  8:22 ` Ricardo Wurmus [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87sgy4ri66.fsf@elephly.net \
    --to=rekado@elephly.net \
    --cc=h.nasajpour@pantherx.org \
    --cc=help-guix@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).