[Wapt] antislash dans commande python

informatique informatique at challans.fr
Thu Aug 18 12:42:05 CEST 2016


Bonjour,

est-ce que quelqu'un sait comment gèrer les antislashs dans une commande run python ?

run(r'powershell -NoProfile -NoLogo -NonInteractive -Command import-startlayout -layoutpath screenlayout.bin -mountpath "c:\"')

me renvoie l'erreur :

2016-08-18 12:34:08,118 CRITICAL Package chal-config-pc not installed due to errors : CalledProcessError: Command '('powershell -NoProfile -NoLogo -NonInteractive -Command "import-startlayout -layoutpath screenlayout.bin -mountpath c:\\"',)'
returned non-zero exit status 1

Le c:\ devient c:\\. Et cela empêche ma commande de s'effectuer correctement

Merci.

Sébastien.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.tranquil.it/pipermail/wapt/attachments/20160818/cb028d5b/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 18082016_123449_0.png
Type: image/png
Size: 17405 bytes
Desc: not available
URL: <http://lists.tranquil.it/pipermail/wapt/attachments/20160818/cb028d5b/attachment.png>


More information about the WAPT mailing list