emacs-devel
[Top][All Lists]
Advanced

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

Re: [ELPA] Package proposal: gnus-mock


From: Eli Zaretskii
Subject: Re: [ELPA] Package proposal: gnus-mock
Date: Fri, 12 Oct 2018 11:16:07 +0300

> From: Eric Abrahamsen <address@hidden>
> Date: Wed, 10 Oct 2018 12:53:51 -0700
> 
> >> 2. There's a small Python script in there that acts as a dummy sendmail
> >> command: when you send an email from a Gnus mock installation, it
> >> hands it off to the Python script, which boomerangs it back to a
> >> folder in the local installation, so you can send yourself messages
> >>    and see what they look like. The script is called with
> >>    "#!/usr/bin/env python", which I assume will be fine for Unix-y
> >>    platforms, but maybe not work for Windows. I'd like it to work for
> >>    Windows -- does anyone have suggestions for a more portable way of
> >>    doing this?
> >
> > Issue a shell command "python SCRIPT"?
> 
> That would work on Windows? (I know nothing about Windows.)

Yes, it should.  'python' is a normal executable, so Windows should
know how to run it.  It's the assumption that the OS understands the
hash-bang signature of a script that's unportable, it is
Unix-specific.

> The problem is that I'm injecting this program at the lowest level
> possible, as the value of `sendmail-program', so that
> `message-send-mail-with-sendmail' works correctly, and all aspects of
> Gnus/message code can be tested. `sendmail-program' is called with
> `call-process-region', so it needs to be an executable.

python.exe is an executable.

> Would there be some way to write an executable wrapper around the
> python program? What would that look like on Windows?

It's possible (with CPython, AFAIK), but why ask users to do something
like that?  Invoking the interpreter directly is much easier, IMO.



reply via email to

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