From: Alex Vong <alexvong1995@gmail.com>
To: Chris Marusich <cmmarusich@gmail.com>
Cc: guile-user@gnu.org
Subject: Re: How to get the preferred environment variable path separator?
Date: Mon, 28 Mar 2016 18:00:53 +0800 [thread overview]
Message-ID: <87oa9yapm2.fsf@gmail.com> (raw)
In-Reply-To: <8760w7juus.fsf@gmail.com> (Chris Marusich's message of "Sun, 27 Mar 2016 17:42:51 -0700")
Hi,
Chris Marusich <cmmarusich@gmail.com> writes:
> Hi,
>
> Info node "(guile) File System" describes a procedure for getting the
> preferred file name separator of the operating system:
>
> -- Scheme Variable: file-name-separator-string
> The preferred file name separator.
>
> Note that on MinGW builds for Windows, both ‘/’ and ‘\’ are valid
> separators. Thus, programs should not assume that
> ‘file-name-separator-string’ is the _only_ file name
> separator—e.g., when extracting the components of a file name.
>
>
> Is there an equivalent procedure for getting the preferred environment
> variable path separator, too? I would expect such a procedure to return
> the ":" string (or does it return a character?) on most GNU/Linux
> distributions, since that is the separator e.g. for the PATH environment
> variable.
>
I can't find one either. If the machine has perl/python, you could try
(use-modules (ice-9 rdelim) (ice-9 popen))
(read-line (open-pipe* OPEN_READ
"perl"
"-e"
"use Config; print $Config{path_sep}"))
or
(use-modules (ice-9 rdelim) (ice-9 popen))
(read-line (open-pipe* OPEN_READ
"python"
"-c"
"import os; print(os.pathsep)"))
> While we're on the topic, Guile's manual has a lot of very nice,
> detailed information about each module. However, it does not seem to
> tell me what the name of the modules are. Where can I find out what the
> name of any module described in the manual - e.g. the module which is
> described in the Info node "(guile) POSIX"?
I think the procedures described in (guile) POSIX are distributed in
different modules. E.g, `open-pipe' is located in `(ice-9 popen)', while
`chdir' is in the global namespace.
next prev parent reply other threads:[~2016-03-28 10:00 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-28 0:42 How to get the preferred environment variable path separator? Chris Marusich
2016-03-28 10:00 ` Alex Vong [this message]
2016-03-28 12:20 ` Thompson, David
2016-03-28 13:46 ` Alex Vong
2016-03-28 14:24 ` Thompson, David
2016-03-28 15:36 ` Paul Smith
2016-03-28 15:36 ` Eli Zaretskii
2016-03-28 15:40 ` Thompson, David
2016-03-29 7:53 ` tomas
2016-03-31 4:38 ` Chris Marusich
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://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87oa9yapm2.fsf@gmail.com \
--to=alexvong1995@gmail.com \
--cc=cmmarusich@gmail.com \
--cc=guile-user@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).