Does there exist a Python-to-Perl translator ?
Tim Hammerquist
tim at vegeta.ath.cx
Tue Oct 2 21:17:40 EDT 2001
Weet Vanniks wrote:
>
> You don't get my point. Managers do want to see Perl code. What I want is
> benefit from the productivity of Python, get something working and then
> satisfy my manageer with a Perl solution.
If you must: =)
$ cat pyperl
#!/usr/bin/perl
open PY, "| /usr/local/bin/python @ARGV"
or die "Can't open pipe to python: $!\n";
print PY $_ while <DATA>;
close PY or die "Error closing pipe to Python: $!\n";
__END__
import sys
print "You're using Python %s" % (sys.version)
$ pyperl
You're using Python 2.1 (#1, Oct 2 2001, 15:26:27)
[GCC 2.95.3 19991030 (prerelease)]
$
--
Trust the computer industry to shorten the term "Year 2000" to Y2K. It
was this kind of thinking that got us in trouble in the first place.
-- Adrian Tyvand
More information about the Python-list
mailing list