Spaces in path name

David S davids at evertech.com.au
Fri Mar 14 07:38:31 EDT 2008


Hi,

Gets me further but still seems to be issue with space after 'Program' as 
code tries to run 'C:\Program'. Don't understand what is going on here...

using "java.exe" from "C:\Program Files\Java\jdk1.6.0_01"
using "C:\Program Files\apache-ant-1.7.0\bin\ant.bat" for building
Building from E:\Red5\red5_server\install\windows
Cleaning old directories...
Compiling Java 1.5 version...
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.
Traceback (most recent call last):
  File "installer.py", line 132, in <module>
    main()
  File "installer.py", line 128, in main
    builder.build()
  File "installer.py", line 70, in build
    self.compile(self.ant_cmd, os.path.join(red5_root, 'build.xml'), '1.5', 
'cle
an', 'installerdist')
  File "installer.py", line 26, in compile
    assert os.system('%s -quiet -Djava.target_version=%s -buildfile %s%s' % 
(ant
, version, script, args)) == 0
AssertionError


"Bryan Olson" <fakeaddress at nowhere.org> wrote in message 
news:LxqCj.19741$Ch6.1841 at newssvr11.news.prodigy.net...
> David S wrote:
>> I get
>>
>> ERROR: ""C:\Program Files\apache-ant-1.7.0\bin\ant"" does not exist
>>
>> If I cut the path statement here and paste it next to a windows XP 
>> command prompt ant is invoked.
>>
>> The python code here is
>>     if not os.path.isfile(ANT_CMD):
>>         error('"%s" does not exist' % ANT_CMD)
>
> There you don't want the quotes within the string. On my MS-Win box:
>
>   >>> import os
>   >>> os.path.isfile(r'C:\Program Files\Windows NT\dialer.exe')
>   True
>   >>> print os.path.isfile(r'"C:\Program Files\Windows NT\dialer.exe"')
>   False
>
>
> -- 
> --Bryan 





More information about the Python-list mailing list