[Tutor] Python Command Line Args (input) equivalent to Perl
Edward WIJAYA
ewijaya at singnet.com.sg
Wed Oct 27 20:27:03 CEST 2004
Dear Tutor,
I am new to Python, and I like to
learn more about it. Since I am
used to Perl before, I would like
to know what is Python equivalent
of Perl code below:
$filename = $ARGV[0];
open (FILE,"$filename") || die "Can't Open $filename: $!\n";
while<FILE>{ #dealing with it per-lines
#process something here
}
Please also kindly suggest any pointer/website
link, where I can find Perl-Python concordance,
especially to facilitate Perl conversion to Python.
Thanks so much for your time.
Hope to hear from you again.
--
Regards,
Edward WIJAYA
SINGAPORE
More information about the Tutor
mailing list