473,320 Members | 2,035 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Build a project from the script using popen3

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\GFHA L\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
Jul 18 '05 #1
1 2076
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.

"Ruchika" <ru***********@hotmail.com> wrote in message
news:82**************************@posting.google.c om...
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\GFHA L\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

Jul 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: lamar_air | last post by:
I have a fortran executable which when run from cmd it asks for a series of parameters which you enter then hit enter. From my python cgi script i want to be able to run the executable. Enter the...
2
by: Rajarshi Guha | last post by:
Hi, I have some code that runs an interactive program via popen3(). The program generates output which is then used later on. My script looks like this: o,i,e =...
13
by: Russell E. Owen | last post by:
I'm trying to launch an application from Python 2.3 on Windows. The application is "ds9" (an image viewer), and is installed in C:\Program Files\ds9\ds9 On unix I just do: os.popen3("ds9") and...
4
by: Slalomsk8er | last post by:
I don't get it with the popen (popen3 or subprocess). 1. How do I establish my pipes? 2. And how do I interact with the pipes (interactive CGI-page)? Thanks, Dominik
7
by: Dave L | last post by:
I have a VB.NET 2003 solution with several Windows forms projects and a deployment project. All of that works ok. I need to run an external script or program during the build process. It could...
12
by: David Murmann | last post by:
hi all! i just built revision 41809 under winxp using a rather uncommon setup (at least i think so). since i have no visual studio here, i only used freely available tools: cygwin to get the...
3
by: michael.lang | last post by:
I am using PostBuild events in a C# project to run some tasks, but only when in release configuration mode. The build events run perfectly as expected when run. The problem comes when I save the...
2
by: Jeffrey Barish | last post by:
I have an application that has been working fine on Linux, but now I need to port it to Windows XP. The program uses Popen3 to run another program. I use Popen3 so that I can access the pid...
1
by: Matt Fielder | last post by:
I need to customize the build process beyond just selecting which projects get built in what order. What I want to happen is when I select "Release" 1: Pop a dialog confirming I want to build...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.