Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #84637
| Path | csiph.com!usenet.pasdenom.info!gegeweb.org!usenet-fr.net!nerim.net!novso.com!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <pkeogh@compusoftcs.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.005 |
| X-Spam-Evidence | '*H*': 0.99; '*S*': 0.00; 'output': 0.05; 'that?': 0.05; 'see:': 0.07; 'subject:file': 0.07; 'bash': 0.09; 'wrapper': 0.09; 'cc:addr:python-list': 0.11; 'python': 0.11; 'jan': 0.12; 'brace': 0.16; 'solver.': 0.16; 'language': 0.16; 'wrote:': 0.18; 'do.': 0.18; 'bit': 0.19; 'command': 0.22; 'shell': 0.22; 'cc:addr:python.org': 0.22; 'header:User-Agent:1': 0.23; 'subject: .': 0.24; 'mon,': 0.24; 'cc:2**0': 0.24; 'cc:no real name:2**0': 0.24; 'script': 0.25; 'second': 0.26; 'header:In-Reply-To:1': 0.27; "i'm": 0.30; 'url:wiki': 0.31; 'explained': 0.31; 'feeds': 0.31; 'file': 0.32; 'run': 0.32; 'skip:d 20': 0.34; 'subject:the': 0.34; 'could': 0.34; 'more,': 0.35; 'but': 0.35; 'skip:> 10': 0.36; 'thanks': 0.36; 'url:org': 0.36; 'so,': 0.37; 'two': 0.37; 'easily': 0.37; 'thank': 0.38; 'problems': 0.38; 'how': 0.40; 'read': 0.60; 'url:content': 0.60; 'hope': 0.61; 'simple': 0.61; 'first': 0.61; 'email addr:gmail.com': 0.63; 'myself': 0.63; 'skip:n 10': 0.64; 'to:addr:gmail.com': 0.65; '8bit%:18': 0.93 |
| Date | Mon, 26 Jan 2015 13:30:48 -0800 (PST) |
| From | Philip Keogh <pkeogh@compusoftcs.com> |
| X-X-Sender | pkeogh@raven.philkeogh.com |
| To | varun7rs@gmail.com |
| Subject | Re: Running a .py file iteratively at the terminal |
| In-Reply-To | <6e21583e-8c62-413f-b54a-1e7ffaab9fd4@googlegroups.com> |
| References | <bea3815c-7a64-417a-959c-9408581a643e@googlegroups.com> <mailman.18158.1422304262.18130.python-list@python.org> <6e21583e-8c62-413f-b54a-1e7ffaab9fd4@googlegroups.com> |
| User-Agent | Alpine 2.11 (DEB 23 2013-08-11) |
| MIME-Version | 1.0 |
| Content-Type | MULTIPART/MIXED; BOUNDARY="-817230350-1767848229-1422307848=:12714" |
| X-Mailman-Approved-At | Tue, 27 Jan 2015 09:17:54 +0100 |
| Cc | python-list@python.org |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.18167.1422346675.18130.python-list@python.org> (permalink) |
| Lines | 35 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1422346675 news.xs4all.nl 2853 [2001:888:2000:d::a6]:60724 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:84637 |
Show key headers only | View raw
[Multipart message — attachments visible in raw view] - view raw
On Mon, 26 Jan 2015, varun7rs@gmail.com wrote: > Thanks a lot Mark but that would be a bit trivial. How can I run the > same file multiple times? Or if I need to run two commands: > srva@hades:~$ python NFV_nw_eu_v3_14_1_15.py --output eu_v3_14_1_15 > --demand demands_v3_21_1_15.xml --xml nobel-eu.xml >srva@hades:~$ python NFV_v3_7_10_14.py -l log --lp --xml eu_v3_14_1_15.xml > repeatedly, how can I do that? Can I write a script to perform this > function?If so, can you please help me with it? The first command > generates an output file eu_v3 and the second file feeds it to the > solver. This is what I intend to do multiple times. I hope I have > explained it this time in a much better way. I'm sorry English is my > second language and I have some problems in expressing myself at > times. > > Thank You > Have you read about Bash shell brace expansion, or a one-liner loop? A simple wrapper script could easily accomplish what you seem to be attempting to do. For more, see: http://tldp.org/LDP/Bash-Beginners-Guide/html/sect_03_04.html http://www.linuxjournal.com/content/bash-brace-expansion http://wiki.bash-hackers.org/syntax/expansion/brace http://tldp.org/LDP/abs/html/loops1.html
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
Running a .py file iteratively at the terminal varun7rs@gmail.com - 2015-01-26 11:52 -0800
Re: Running a .py file iteratively at the terminal Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-01-26 20:30 +0000
Re: Running a .py file iteratively at the terminal varun7rs@gmail.com - 2015-01-26 13:10 -0800
Re: Running a .py file iteratively at the terminal Cameron Simpson <cs@zip.com.au> - 2015-01-27 09:35 +1100
Re: Running a .py file iteratively at the terminal Philip Keogh <pkeogh@compusoftcs.com> - 2015-01-26 13:30 -0800
csiph-web