Re: [Tutor] Diamond Equivalent

2005-09-23 Thread kim.d
Bob, Michael, my thanks to you both for answering my diamond operator question. Bob, I tried the lines you suggested and they worked just the way I wanted them to. Thanks. Michael, thanks for the user functions or subroutines: not sure what Python calls them. A lot of food for thought there. M

Re: [Tutor] Diamond Equivalent

2005-09-23 Thread Michael Sparks
On Thursday 22 September 2005 23:46, [EMAIL PROTECTED] wrote: > I am coming to Python from Perl. Does Python have anything like the diamond > operator found in Perl? The correct answer is not really no, but you can manually perform the same tasks. For those who don't know perl, <> is an incredibly

Re: [Tutor] Diamond Equivalent

2005-09-23 Thread bob
At 04:37 AM 9/23/2005, [EMAIL PROTECTED] wrote: >[snip] >In perl I can write this: > >@array = <>; >print @array; > >If I save that and call it from the command line, I can include the name of a >file after the script name. It will read in the file, putting each line >into an >element of the array

Re: [Tutor] Diamond Equivalent

2005-09-23 Thread kim.d
bob wrote <<>> Sorry bob, that's what comes of posting my question last thing at night when finding the way upstairs is difficult enough. In perl I can write this: @array = <>; print @array; If I save that and call it from the command line, I can include the name of a file after the script na

Re: [Tutor] Diamond Equivalent

2005-09-23 Thread kim.d
>It is included as part of the standard >library (as are all the modules in the doc >Danny referenced). Thanks, Kent. ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Diamond Equivalent

2005-09-23 Thread Kent Johnson
[EMAIL PROTECTED] wrote: >>>I am coming to Python from Perl. Does Python have >>>anything like the diamond operator found in Perl? > > > >>Python includes a module called 'fileinput' that does sorta this: >> http://www.python.org/doc/lib/module-fileinput.html >>If you have more questions, ple

Re: [Tutor] Diamond Equivalent

2005-09-23 Thread kim.d
>> I am coming to Python from Perl. Does Python have >>anything like the diamond operator found in Perl? >Python includes a module called 'fileinput' that does sorta this: >http://www.python.org/doc/lib/module-fileinput.html >If you have more questions, please feel free to ask. >Good luck

Re: [Tutor] Diamond Equivalent

2005-09-22 Thread bob
At 03:46 PM 9/22/2005, [EMAIL PROTECTED] wrote: >I am coming to Python from Perl. Does Python have anything like the diamond >operator found in Perl? Some of us (who don't know Perl) might help you if you tell us what the diamond operator does. How could we get to first base with it? What are its

Re: [Tutor] Diamond Equivalent

2005-09-22 Thread Danny Yoo
On Thu, 22 Sep 2005 [EMAIL PROTECTED] wrote: > I am coming to Python from Perl. Does Python have anything like the > diamond operator found in Perl? Hi Kim, According to 'perldoc perlop': """ The null filehandle <> is special: it can be used to emulate the behavior of sed and a

[Tutor] Diamond Equivalent

2005-09-22 Thread kim.d
I am coming to Python from Perl. Does Python have anything like the diamond operator found in Perl? ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor