help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Win32 - how do I execute a shell command?


From: Jason Rumney
Subject: Re: Win32 - how do I execute a shell command?
Date: Thu, 29 Jul 2004 22:36:25 +0100
User-agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (windows-nt)

Paul Moore <address@hidden> writes:

> 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.

Are you sure the shell doesn't like the forward slashes? The Windows
command-line will not automatically execute Python scripts AFAIK, so
your command line will either have to start with the Python
interpretor, or "start ", which invokes the Explorer association.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]