Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #3323
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!feeder1.hal-mli.net!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!l30g2000vbn.googlegroups.com!not-for-mail |
|---|---|
| From | Phil Winder <philipwinder@gmail.com> |
| Newsgroups | comp.lang.python |
| Subject | [Q] ipython: Multiple commands on the same line and newlines |
| Date | Sat, 16 Apr 2011 06:55:43 -0700 (PDT) |
| Organization | http://groups.google.com |
| Lines | 21 |
| Message-ID | <8dc6c9e4-e50e-401f-95d9-42f80a90196c@l30g2000vbn.googlegroups.com> (permalink) |
| NNTP-Posting-Host | 94.7.118.247 |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=ISO-8859-1 |
| X-Trace | posting.google.com 1302962144 19437 127.0.0.1 (16 Apr 2011 13:55:44 GMT) |
| X-Complaints-To | groups-abuse@google.com |
| NNTP-Posting-Date | Sat, 16 Apr 2011 13:55:44 +0000 (UTC) |
| Complaints-To | groups-abuse@google.com |
| Injection-Info | l30g2000vbn.googlegroups.com; posting-host=94.7.118.247; posting-account=qlb0CwoAAADCEuLqa5o9vjtvqi7-FncY |
| User-Agent | G2/1.0 |
| X-HTTP-UserAgent | Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Ubuntu/10.10 Chromium/10.0.648.133 Chrome/10.0.648.133 Safari/534.16,gzip(gfe) |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.python:3323 |
Show key headers only | View raw
Hi,
I'm having a go at using ipython as a command prompt for data
analysis. Coming from Matlab, I'm used to typing multiple commands on
the same line then using the up arrow to go through my history.
How can I write multiple python commands on the same line?
E.g. "x = 0; while x < 10: x = x + 1;" returns an "invalid syntax"
error on the 'e' in while.
Also, how can I produce a new line, without it running the command? I
would have expected a ctrl-enter or shift-enter to produce the
expected results.
E.g. I want:
"x = 0; <ctrl-enter>
while x < 10: <ctrl-enter>
x = x + 1; <ctrl-enter>
" <enter to run>
It seems to work automatically for the "while xxx:", but combinations
of keys+enter do not work for "normal" lines.
Cheers,
Phil
Back to comp.lang.python | Previous | Next — Next in thread | Find similar
[Q] ipython: Multiple commands on the same line and newlines Phil Winder <philipwinder@gmail.com> - 2011-04-16 06:55 -0700
Re: [Q] ipython: Multiple commands on the same line and newlines Andrea Crotti <andrea.crotti.0@gmail.com> - 2011-04-16 18:29 +0200
Re: ipython: Multiple commands on the same line and newlines Phil Winder <philipwinder@gmail.com> - 2011-04-16 09:37 -0700
Re: ipython: Multiple commands on the same line and newlines Andrea Crotti <andrea.crotti.0@gmail.com> - 2011-04-17 14:11 +0200
Re: ipython: Multiple commands on the same line and newlines Phil Winder <philipwinder@gmail.com> - 2011-04-17 11:40 -0700
Re: ipython: Multiple commands on the same line and newlines Alexander Kapps <alex.kapps@web.de> - 2011-04-17 21:39 +0200
Re: [Q] ipython: Multiple commands on the same line and newlines Chris Angelico <rosuav@gmail.com> - 2011-04-17 02:33 +1000
Re: [Q] ipython: Multiple commands on the same line and newlines Terry Reedy <tjreedy@udel.edu> - 2011-04-16 12:39 -0400
Re: [Q] ipython: Multiple commands on the same line and newlines harrismh777 <harrismh777@charter.net> - 2011-04-18 01:01 -0500
Re: [Q] ipython: Multiple commands on the same line and newlines Chris Angelico <rosuav@gmail.com> - 2011-04-18 16:12 +1000
Re: [Q] ipython: Multiple commands on the same line and newlines "OKB (not okblacke)" <brenNOSPAMbarn@NObrenSPAMbarn.net> - 2011-04-17 04:22 +0000
csiph-web