On Mon, Apr 18, 2011 at 4:01 PM, harrismh777 wrote:
> It might be nice (as an option) to be able to disengage the forced
> indentation syntax rules of Python. In other words, provide indentation
> syntax by default and allow an option via environment variable to engage an
> alternate (more C-li
Terry Reedy wrote:
You can write multiple *simple* statements using ';'.
All compound statements, like while, must start on own line.
E.g. I want:
"x = 0;
This is one statement
while x< 10:
x = x + 1;
Lutz has a very nice write-up entitled "Why Indentation Syntax?"
Lutz, Mark
Phil,
there is one more way you can run all commands as in linux shell..
>>> import commands
>>> s, o = commands.getstatusoutput('x=10;for i in $(seq $x); do echo $i ;
done')
>>> print o
1
2
3
4
5
6
7
8
9
10
>>>
On Sun, Apr 17, 2011 at 11:40 AM, Phil Winder wrote:
> On Apr 17, 1:11 pm, Andrea C
On 17.04.2011 20:40, Phil Winder wrote:
Ok, thanks all. It's a little disappointing, but I guess that you
always have to work in a different way when you move to a new
language. Andrea's %edit method is probably the best compromise, but
this now means that I will have to learn all the (obscure) s
On Apr 17, 1:11 pm, Andrea Crotti wrote:
> Phil Winder writes:
> > Yes, that does not produce an error, but it does not "work". Please
> > refer to my first post. Try the first code, you will get a syntax
> > error. Placing things on one line makes for easy history scrollback.
> > In your version
Phil Winder writes:
> Yes, that does not produce an error, but it does not "work". Please
> refer to my first post. Try the first code, you will get a syntax
> error. Placing things on one line makes for easy history scrollback.
> In your version you will have 2 lines of history for the x = 0 ter
Phil Winder wrote:
> 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
Hi Phil...
> 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.
I don`t think this is possible under any Python version.
There will always be some kind of user intervention required other th
On 4/16/2011 9:55 AM, Phil Winder wrote:
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 lin
On Apr 16, 5:29 pm, Andrea Crotti wrote:
> Phil Winder writes:
> > 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 writ
On Sun, Apr 17, 2011 at 2:29 AM, Andrea Crotti
wrote:
> for
> x = 10
>
> what's the difference for you if it gets evaluated before or after?
I have the same issue in IDLE sometimes, and the reason it's annoying
relates to the up-arrow key (Alt-P in IDLE). I can retrieve one entire
command, but if
Phil Winder writes:
> 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. "
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;" r
13 matches
Mail list logo