[Wapt] Lancer une commande contenant des espaces dans le chemin

Bastien HERMITTE bhermitte at b2pweb.com
Mon Aug 31 21:22:46 CEST 2015


Bonsoir,

Ceci devrait fonctionner ;)

command=r'"C:\Program Files\OpenOffice 4\Program\unopkg.exe" "C:\Program 
Files\OpenOffice 4\Program\DisableFirstStartWzd.oxt"'

Bastien

Le 31/08/2015 21:16, informatique a écrit :
> Bonjour TIS,
>
> je n'arrive pas à éxcuter une commande contenant des espaces, comment 
> scripter cela dans le setup.py ? :
>
> Voici l'extrait de mon script :
>
> /command="C:\Program Files\OpenOffice 4\Program\unopkg.exe C:\Program 
> Files\OpenOffice 4\Program\DisableFirstStartWzd.oxt"/
> /print command/
> /run(command)/
>
> Voici mon erreur :
>
> /2015-08-31 18:32:32,927 CRITICAL Fatal error in install script: 
> CalledProcessErr/
> /or: Command '('C:\\Program Files\\OpenOffice 4\\Program\\unopkg.exe 
> C:\\Program/
> /Files\\OpenOffice 4\\Program\\DisableFirstStartWzd.oxt',)' returned 
> non-zero exi/
> /t status 1:Traceback (most recent call last):/
> / File "C:\wapt\common.py", line 3166, in install_wapt/
> /   exitstatus = setup.install()/
> / File "c:\docume~1\adminv~1\locals~1\temp\waptyigafy\setup.py", line 
> 24, in ins/
> /tall/
> /   run(command)/
> / File "C:\wapt\common.py", line 3013, in run/
> /   return setuphelpers.run(*arg,pidlist=self.pidlist,**args)/
> / File "C:\wapt\setuphelpers.py", line 602, in run/
> /   raise 
> subprocess.CalledProcessError(proc.returncode,cmd,''.join(output))/
> /CalledProcessError: Command '('C:\\Program Files\\OpenOffice 
> 4\\Program\\unopkg./
> /exe C:\\Program Files\\OpenOffice 
> 4\\Program\\DisableFirstStartWzd.oxt',)' retur/
> /ned non-zero exit status 1/
>
> /2015-08-31 18:32:33,661 CRITICAL Package chal-openoffice not 
> installed due to er/
> /rors : CalledProcessError: Command '('C:\\Program Files\\OpenOffice 
> 4\\Program\\/
> /unopkg.exe C:\\Program Files\\OpenOffice 
> 4\\Program\\DisableFirstStartWzd.oxt',)/
> /' returned non-zero exit status 1/
>
> Merci.
>
> Sébastien.
>
>
>
> _______________________________________________
> WAPT mailing list
> WAPT at lists.tranquil.it
> http://lists.tranquil.it/listinfo/wapt

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.tranquil.it/pipermail/wapt/attachments/20150831/671b4460/attachment.html>


More information about the WAPT mailing list