Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #45781 > unrolled thread
| Started by | Alex Naumov <alexander_naumov@opensuse.org> |
|---|---|
| First post | 2013-05-23 09:20 +0200 |
| Last post | 2013-05-23 09:20 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
newbie question about subprocess.Popen() arguments Alex Naumov <alexander_naumov@opensuse.org> - 2013-05-23 09:20 +0200
| From | Alex Naumov <alexander_naumov@opensuse.org> |
|---|---|
| Date | 2013-05-23 09:20 +0200 |
| Subject | newbie question about subprocess.Popen() arguments |
| Message-ID | <mailman.1998.1369293617.3114.python-list@python.org> |
[Multipart message — attachments visible in raw view] — view raw
Hello, I'm trying to call new process with some parameters. The problem is that the last parameter is a "string" that has a lot of spaces and different symbols like slash and so on. I can save it in file and use name of this file as parameter, but my question is: how to make it without additional saving? import subprocess as sp rc = sp.Popen(["prog", "--options", "<", msg], stdin=sp.PIPE, stdout=sp.PIPE) stdout = rc.communicate()[0] print stdout Thank you, Alex p.s. type(msg) => <type 'str'>
Back to top | Article view | comp.lang.python
csiph-web