[Tutor] Executing a C Program from RH Linux in Python for Win

Marc Tompkins marc.tompkins at gmail.com
Fri Mar 20 18:18:14 CET 2009


On Fri, Mar 20, 2009 at 10:02 AM, Marc Tompkins <marc.tompkins at gmail.com>wrote:

> Neither Python proper nor Popen() are actually executing the program - the
> Windows shell/command interpreter does that (command.com or cmd.exe,
> depending on your Windows version); Popen() is just a mechanism for making
> the request, waiting for a response, and processing the result when it
> comes.
>

I wasn't very clear here: instead of "the Windows shell/command interpreter
does that..." I should have said "the underlying operating system/shell does
that..."

There are versions of Python for many platforms, and Python code is intended
to be as cross-platform as possible, so if you were running some other
operating system on your machine, Popen() would be passing your request
to... whatever.  And if you were running, say, Linux, and trying to execute
a Windows program... that wouldn't work either.  (Unless you told Popen to
pass it through WINE, but I'm not even sure that's possible.  There isn't an
equivalent to WINE for running Linux executables under Windows, so far as I
can Google.)
-- 
www.fsrtechnologies.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20090320/e39b8a18/attachment.htm>


More information about the Tutor mailing list