Build a project from the script using popen3

R

Ruchika

Hi,

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++
4.0\Common\EVC\Bin\EVC.EXE"'
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,
config))
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
file.\n']".

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?

Thanks,
Ruchika
 
L

Larry Bates

You may have more success using the mangled (8.3)
directory names in your pathnames. The ones with
spaces in them (e.g. Program Files) is the problem.
On my machine the mangled name for Program Files is
Progra~1 (they can be seen with dir /x command at
command prompt). There may be another way to use
the long filenames, but I'll bet this will be the
easiest.

Larry Bates
Syscon, Inc.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top