Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #77387 > unrolled thread

subprocess module usage

Started byEarl Lapus <earl.lapus@gmail.com>
First post2014-09-01 11:28 +0800
Last post2014-09-01 11:28 +0800
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python


Contents

  subprocess module usage Earl Lapus <earl.lapus@gmail.com> - 2014-09-01 11:28 +0800

#77387 — subprocess module usage

FromEarl Lapus <earl.lapus@gmail.com>
Date2014-09-01 11:28 +0800
Subjectsubprocess module usage
Message-ID<mailman.13677.1409542522.18130.python-list@python.org>

[Multipart message — attachments visible in raw view] — view raw

Hi,

I made simple test program using the subprocess module (see attached:
exec_cmd.py). I ran it passing variations of 'ls' command options.

I encounter exceptions every time I use '-l' options. Example runs
where exception occurs:
# ./exec_cmd.py ls -al
# ./exec_cmd.py ls -l

However, if I pass 'ls' and arguments as one argument, like so:
#./exec_cmd.py 'ls -al'
exception does not occur.

I logged output (see ls_test.out).

So, what could be causing this behavior? Is this expected or is there
something wrong with how I'm using the subprocess module?

Cheers,
Earl

-- 
There are seven words in this sentence.

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web