Re: Build a project from the script using popen3

From: Larry Bates (lbates_at_swamisoft.com)
Date: 09/10/04


Date: Fri, 10 Sep 2004 08:31:58 -0500

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" <ruchika_khera@hotmail.com> wrote in message
news:82880e86.0409091527.342d9754@posting.google.com...
> 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



Relevant Pages

  • [opensuse] Embedded Spaces in Pathnames
    ... I have a script that walks all of the ext3 filesystems on a system and detects those files and directories with either no user or no group creating an output file using the -ls option on the find command. ... I have tried everything I can think of using shell scripts, awk and perl and they all have problems with pathnames with embedded spaces. ...
    (SuSE)
  • Re: make command throws error "Perl script no found" C:/Program No such file or directory
    ... When I issue the make command it throws error ... Perl is not installed in Program files it under c: ... It is not worried about perl, it is worried about the script ...
    (perl.beginners)
  • Re: Active X Controls show as "2" files in Downloaded Program Fold
    ... Program Files", otherwise that error message will appear. ... If you deleted and recreated the folder, then you will need to follow the ... at a command prompt for the full set of options] ...
    (microsoft.public.windowsxp.general)
  • Re: How does VFP locate class libraries during runtime?
    ... > When you issue the DO command with a procedure name, Visual FoxPro ... The file containing the DO command. ... Program files in the execution chain. ...
    (microsoft.public.fox.helpwanted)
  • Re: erasing a folder filled with locked files
    ... I did not know that about the quotes around a file name in dos. ... MusicMatch is working fine now. ... > or path that includes a space character (such as Program Files), ... and WinXP will usually refuse the command to delete such a file ...
    (microsoft.public.windowsxp.basics)