Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #17012 > unrolled thread
| Started by | Andrew Berg <bahamutzero8825@gmail.com> |
|---|---|
| First post | 2011-12-11 23:24 -0600 |
| Last post | 2011-12-11 23:24 -0600 |
| 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: subprocess question Andrew Berg <bahamutzero8825@gmail.com> - 2011-12-11 23:24 -0600
| From | Andrew Berg <bahamutzero8825@gmail.com> |
|---|---|
| Date | 2011-12-11 23:24 -0600 |
| Subject | Re: subprocess question |
| Message-ID | <mailman.3530.1323667463.27778.python-list@python.org> |
On 12/11/2011 10:39 PM, jyoung79@kc.rr.com wrote: > And another question - why can't I use the tilde as a shortcut to the home directory? Because subprocess doesn't use the shell (which is what expands the tilde to the invoking user's home directory). I recommend using os.path.join and os.environ anyway. p = subprocess.Popen(['du', '-sh', os.path.join(os.environ['home'], '.Trash')], stdout=subprocess.PIPE) -- CPython 3.2.2 | Windows NT 6.1.7601.17640 | Thunderbird 7.0
Back to top | Article view | comp.lang.python
csiph-web