Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #7393 > unrolled thread
| Started by | Tim Chase <python.list@tim.thechases.com> |
|---|---|
| First post | 2011-06-10 13:31 -0500 |
| Last post | 2011-06-10 13:31 -0500 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Question About Command line arguments Tim Chase <python.list@tim.thechases.com> - 2011-06-10 13:31 -0500
| From | Tim Chase <python.list@tim.thechases.com> |
|---|---|
| Date | 2011-06-10 13:31 -0500 |
| Subject | Re: Question About Command line arguments |
| Message-ID | <mailman.93.1307730688.11593.python-list@python.org> |
On 06/10/2011 12:58 PM, Mark Phillips wrote:
> How do I write my script so it picks up argument from the
> output of commands that pipe input into my script?
You can check
if os.isatty(sys.stdin): # <-- this check
do_stuff_with_the_terminal()
else:
read_options_from_stdin()
-tkc
Back to top | Article view | comp.lang.python
csiph-web