How can i do this in Python?

Jerry jweida at gmail.com
Thu Jan 25 00:03:05 EST 2007


Well, the python interpreter has no equivalent to -n or -a in the perl
interpreter.  You'd have to implement it using an actual while loop and
because of the indention sensitivity in Python, I don't believe you can
do it on the command line.  (I may be very wrong here, but I've not
gotten it to work).

--
Jerry

On Jan 24, 10:25 pm, "NoName" <zaz... at gmail.com> wrote:
> perl -ane "print join(qq(\t), at F[0,1,20,21,2,10,12,14,11,4,5,6]).qq(\n)"
> file.txt
>
> -a autosplit mode with -n or -p (splits $_ into @F)
> -n assume "while (<>) { ... }" loop around program




More information about the Python-list mailing list