Build a project from the script using popen3

Ruchika ruchika_khera at
Thu Sep 9 19:27:01 EDT 2004


I want to build an embedded Visual C++ project from the python script.
This is what I do -

evc = r'"C:\Program Files\Microsoft eMbedded C++
proj = r'"C:\Handheld\SC10\GFSDK\dev\Drivers\CE.EVC4\GFHAL\GFHAL.Vcp"'
config = "GFHAL - Win32 (WCE ARMV4) Release"

print '%s %s /MAKE %s /REBUILD' % (evc, proj, config)
inf, out, err = os.popen3( '%s %s /MAKE %s /REBUILD' % (evc, proj,
print err.readlines()

I get the following error message - "["'C:\\Program' is not recognized
as an internal or external command,\n", 'operable program or batch

I wanted to make sure the path is right. So I tried to open the
project workspace using popen3 and succeeded -
inf, out, err = os.popen3( '%s' % (proj))

Is something wrong with the way i am using the build command in the
script? I am sure the build command is fine because I ran it on the
command line before trying it in the script. Can we not run the build
command from inside the script?

Am I using "/" in /MAKE and /REBUILD correctly in the script?


More information about the Python-list mailing list