Perl to python converter
Any thoughts?
Re: Perl to python converter
On Fri, 23 Dec 2011 13:44:50 +0530 a b testa...@gmail.com wrote: Any thoughts? Writing a Perl to python converter would not be very trivial, and I'm not sure it will be guaranteed to work 100% well. See: * http://stackoverflow.com/questions/1062026/are-there-programmatic-tools-for-perl-to-python-conversion * http://www.google.com/search?q=perl%20to%20python%20converter One option for you would be to embed the perl interpreter inside Python's: http://search.cpan.org/dist/pyperl/ Regards, Shlomi Fish -- - Shlomi Fish http://www.shlomifish.org/ Stop Using MSIE - http://www.shlomifish.org/no-ie/ Give me ASCII or give me deaþ! Please reply to list if it's a mailing list post - http://shlom.in/reply . -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: Perl to python converter
On Dec 23, 2011 3:47 AM, Shlomi Fish shlo...@shlomifish.org wrote: On Fri, 23 Dec 2011 13:44:50 +0530 a b testa...@gmail.com wrote: Any thoughts? Writing a Perl to python converter would not be very trivial, and I'm not sure it will be guaranteed to work 100% well. See: I think the bigger issue might be that it would produce such butt ugly code that no one would use it (and I'm not cracking on python here). I think you'd end up using Deparse for getting you 90% there but then you'd run into edge cases that would force you to look at the walking the pad and stack trace. Also maybe perldoc perlguts That said, I wouldn't mind helping with such a project. It would be a great way to get really intimate with both languages and interpreters (and the p5p group). It would also get me closer to figuring out static analysis of interpreted languages.
Re: Perl to python converter
On Fri, Dec 23, 2011 at 5:14 AM, a b testa...@gmail.com wrote: Any thoughts? Sure. It's called a college student. You hire one to do the job for you.
Re: Perl to python converter
On 23/12/11 14:34, Brian Fraser frase...@gmail.com wrote: On Fri, Dec 23, 2011 at 5:14 AM, a b testa...@gmail.com wrote: Any thoughts? Sure. It's called a college student. You hire one to do the job for you. Now why didn't I think of that? ;-) Cheers, Phil... -- Nothing to see here... move along, move along -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
FW: Perl to python converter
Guys, all posts in this thread are now being sent to me not the list. Please adjust your reply-to's accordingly. Thanks, Phil... -- Nothing to see here... move along, move along -- Forwarded Message From: fudmer rieley southofmex...@yahoo.com Date: Fri, 23 Dec 2011 09:33:02 -0800 (PST) To: Phil Dobbin phildob...@gmail.com Subject: Re: Perl to python converter Maybe a better project would be to work toward the development of a standard xsl style sheet able to parse source code or binary of each software language into a tree such that xslt could parse the intermediate tree and transform its structure into a multitude of other language source codes or binaries. I do not know if it would be easier to work at the binary level than the source code level. But I believe much of the technology to transform source code and binaries from one language set to another language set already exist. xsl, xslt tools I believe have a perfect fit in perl. XSL [code lang1], [XSLT :: XSLT ], XSL [code lang2[ Parse the code, build the tree::parse the tree, output the new code. Merely writing xsl parsing and tree layouts for each language [source or complied binary] and conforming the xsl style sheet to the xslt transform standards, the machine genetics and super protected kernels that talk to them, might resolve to trivial. Moreover there are lots of persons with transforming experience around who might help. Is it not possible to develop the transforms between languages in xslt style sheet fashion? Would such a transform impose on the copyright or patent rights of one or more languages or language parts? I would love to work on this type of project, but I am a beginning perl programmer. --- On Fri, 12/23/11, Phil Dobbin phildob...@gmail.com wrote: From: Phil Dobbin phildob...@gmail.com Subject: Re: Perl to python converter To: perl beginners@perl.org Date: Friday, December 23, 2011, 9:57 AM On 23/12/11 14:34, Brian Fraser frase...@gmail.com wrote: On Fri, Dec 23, 2011 at 5:14 AM, a b testa...@gmail.com wrote: Any thoughts? Sure. It's called a college student. You hire one to do the job for you. Now why didn't I think of that? ;-) Cheers, Phil... -- Nothing to see here... move along, move along -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/ -- End of Forwarded Message -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
FW: can only install cpan modules as sudo
May I please re-iterate again: please send replies to this thread to the list, not me. All it takes is a quick look at to whom you are addressing your email to then the list will receive it not me alone. Thank You. Phil. -- Forwarded Message From: fudmer rieley southofmex...@yahoo.com Date: Fri, 23 Dec 2011 15:56:33 -0800 (PST) To: Phil Dobbin phildob...@gmail.com Subject: Re: can only install cpan modules as sudo in response to the question of writing a perl to python converter i forwarded to the list thisand no one has responded nor has it appeared on the list.. is something wrong with the list? Maybe a better project would be to work toward the development of a standard xsl style sheet able to parse source code or binary of each software language into a tree such that xslt could parse the intermediate tree and transform its structure into a multitude of other language source codes or binaries. I do not know if it would be easier to work at the binary level than the source code level. But I believe much of the technology to transform source code and binaries from one language set to another language set already exist. xsl, xslt tools I believe have a perfect fit in perl. XSL [code lang1], [ XSLT :: XSLT ], XSL [code lang2[ Parse the code, build the tree::parse the tree, output the new code. Merely writing xsl parsing and tree layouts for each language [source or complied binary] and conforming the xsl style sheet to the xslt transform standards, the machine genetics and super protected kernels that talk to them, might resolve to trivial. Moreover there are lots of persons with transforming experience around who might help. Is it not possible to develop the transforms between languages in xslt style sheet fashion? Would such a transform impose on the copyright or patent rights of one or more languages or language parts? --- On Wed, 12/21/11, Phil Dobbin phildob...@gmail.com wrote: From: Phil Dobbin phildob...@gmail.com Subject: Re: can only install cpan modules as sudo To: perl beginners@perl.org Date: Wednesday, December 21, 2011, 1:26 PM On 21/12/11 17:59, Ryan.Barracuda ryan.barrac...@elboardo.com wrote: Thanks! Would you recommend I uninstall ActiveState and install Perlbrew first? Depends whereabouts it is on your machine. If ActiveState resides in ~/ then yes, I would. If not, it's entirely optional you can just go ahead install perlbrew as per the defaults. This blog should help you get started: http://blog.fox.geek.nz/2010/09/installing-multiple-perls-with.html Cheers, Phil... -- Nothing to see here... move along, move along -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/ -- End of Forwarded Message -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: FW: can only install cpan modules as sudo
--- On Fri, 12/23/11, Phil Dobbin phildob...@gmail.com wrote: From: Phil Dobbin phildob...@gmail.com Subject: FW: can only install cpan modules as sudo To: perl beginners@perl.org Cc: fudmer rieley southofmex...@yahoo.com Date: Friday, December 23, 2011, 7:13 PM in response to the question of writing a perl to python converter i Maybe a better project would be to work toward the development of a standard xsl style sheet able to parse source code or binary of each software language into a tree such that xslt could parse the intermediate tree and transform its structure into a multitude of other language source codes or binaries. I do not know if it would be easier to work at the binary level than the source code level. But I believe much of the technology to transform source code and binaries from one language set to another language set already exist. xsl, xslt tools I believe have a perfect fit in perl. XSL [code lang1], [ XSLT :: XSLT ], XSL [code lang2[ Parse the code, build the tree::parse the tree, output the new code. Merely writing xsl parsing and tree layouts for each language [source or complied binary] and conforming the xsl style sheet to the xslt transform standards, the machine genetics and super protected kernels that talk to them, might resolve to trivial. Moreover there are lots of persons with transforming experience around who might help. Is it not possible to develop the transforms between languages in xslt style sheet fashion? Would such a transform impose on the copyright or patent rights of one or more languages or language parts? --- On Wed, 12/21/11, Phil Dobbin phildob...@gmail.com wrote: From: Phil Dobbin phildob...@gmail.com Subject: Re: can only install cpan modules as sudo To: perl beginners@perl.org Date: Wednesday, December 21, 2011, 1:26 PM On 21/12/11 17:59, Ryan.Barracuda ryan.barrac...@elboardo.com wrote: Thanks! Would you recommend I uninstall ActiveState and install Perlbrew first? Depends whereabouts it is on your machine. If ActiveState resides in ~/ then yes, I would. If not, it's entirely optional you can just go ahead install perlbrew as per the defaults. This blog should help you get started: http://blog.fox.geek.nz/2010/09/installing-multiple-perls-with.html Cheers, Phil... -- Nothing to see here... move along, move along -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/ -- End of Forwarded Message -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Help in finding group of text
Dear All, In my text file, the following occurrence are there: begin some of group of text some of group of text some of group of text some of group of text some of group of text some of group of text some of group of text some of group of text some of group of text some of group of text some of group of text some of group of text end In this, I need to search the contents from begin to end and it should be copied into an another file. I tried but all went wrongly. Kindly suggest in this regard. Regards, MadYuv
Re: Help in finding group of text
On Fri, Dec 23, 2011 at 21:34, Saravanan Murugaiah saravanan.muruga...@gmail.com wrote: Dear All, In my text file, the following occurrence are there: begin some of group of text some of group of text some of group of text some of group of text some of group of text some of group of text some of group of text some of group of text some of group of text some of group of text some of group of text some of group of text end In this, I need to search the contents from begin to end and it should be copied into an another file. I tried but all went wrongly. Kindly suggest in this regard. Regards, MadYuv Kindly show us what you tried and we we kindly provide some advice. Ken Wolcott -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: Help in finding group of text
On Sat, Dec 24, 2011 at 2:44 AM, Kenneth Wolcott kennethwolc...@gmail.comwrote: On Fri, Dec 23, 2011 at 21:34, Saravanan Murugaiah saravanan.muruga...@gmail.com wrote: Dear All, In my text file, the following occurrence are there: begin some of group of text some of group of text some of group of text some of group of text some of group of text some of group of text some of group of text some of group of text some of group of text some of group of text some of group of text some of group of text end In this, I need to search the contents from begin to end and it should be copied into an another file. I tried but all went wrongly. Kindly suggest in this regard. Regards, MadYuv Kindly show us what you tried and we we kindly provide some advice. Ken Wolcott I'll admit I laughed :)
Re: Help in finding group of text
Saravanan Murugaiah wrote: Dear All, Hello, In my text file, the following occurrence are there: begin some of group of text some of group of text some of group of text some of group of text some of group of text some of group of text some of group of text some of group of text some of group of text some of group of text some of group of text some of group of text end In this, I need to search the contents from begin to end and it should be copied into an another file. I tried but all went wrongly. Kindly suggest in this regard. #!/usr/bin/perl use warnings; use strict; my $input_file = 'my text file'; my $output_file = 'another file'; open my $IN_FH, '', $input_file or die Cannot open '$input_file' because: $!; open my $OUT_FH, '', $output_file or die Cannot open '$output_file' because: $!; while ( $IN_FH ) { if ( /^begin/ .. /^end/ ) { print $OUT_FH $_; } } close $OUT_FH; close $IN_FH; __END__ John -- Any intelligent fool can make things bigger and more complex... It takes a touch of genius - and a lot of courage to move in the opposite direction. -- Albert Einstein -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/