all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Paul Moore <pf_moore@yahoo.co.uk>
Subject: Win32 - how do I execute a shell command?
Date: Thu, 29 Jul 2004 22:18:09 +0100	[thread overview]
Message-ID: <k6wmms1a.fsf@yahoo.co.uk> (raw)

I have a Python script I want to execute and obtaing the stdout. In
XEmacs, I can do so simply using

    (shell-command-to-string (expand-file-name "~/fortune.py"))

This doesn't work in Gnu Emacs, basically because expand-file-name
returns filenames with *forward* slashes, which the shell doesn't
like.

OK, I could do a global replace of / with \, but that seems like a
hack. Is there a "expand file name in Win32 native format" (ie, with
backslashes) function?

Thanks,
Paul
-- 
A little inaccuracy sometimes saves tons of explanation -- Saki

             reply	other threads:[~2004-07-29 21:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-29 21:18 Paul Moore [this message]
2004-07-29 21:36 ` Win32 - how do I execute a shell command? Jason Rumney
2004-07-30 19:43   ` Paul Moore
2004-07-30  7:15 ` Mathias Dahl

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

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

  git send-email \
    --in-reply-to=k6wmms1a.fsf@yahoo.co.uk \
    --to=pf_moore@yahoo.co.uk \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.