On Fri, Mar 20, 2009 at 8:46 AM, Wayne Watson
<sierra_mtnv...@sbcglobal.net>wrote:

>  I guess I haven't made clear above. This is a Red Hat Linux compiled C
> program. Indications from others above, suggest it is possible to execute it
> under Win Python. If that's true, then my guess is that something prior to
> the call must be done in the way of informing the call it is dealing with a
> non-Win program.
>

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.

If you want to run a non-Windows executable on Windows, you need to use an
alternate shell - someone mentioned Cygwin - although I'm not certain that
even that will do it for you.  What makes an executable OS-specific is not
the language it's written in, but the libraries that it's compiled/linked
with. If you have access to the source code, the simplest thing would
probably be to recompile it on your own machine...  the GCC (Gnu Compiler
Collection) is free.

You mentioned the 'A' attribute - in Windows, that stands for Archive, and
was created as a way for early backup programs to do differential backups
(i.e. you do a full backup - the backup program copies every file, clearing
the A attribute as it does so; new and updated files have the A attribute
set, so the next time you do a backup, the program only copies files that
have the A attribute...)
-- 
www.fsrtechnologies.com
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to