Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Execute selected text as python or perl' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Execute selected text as python or perl
Authored by: waffffffle on Mar 11, '05 11:09:25AM

This would be cool if it was available as a system service, so no cut and pasting needed.



[ Reply to This | # ]
Execute selected text as python or perl
Authored by: adrianm on Mar 11, '05 12:09:17PM
Services can be done as normal scripts/executables, so no programming required.

http://www.crackpot.com/geekfiles/cocoa-filter.html shows how.

[ Reply to This | # ]

Execute selected text as python or perl
Authored by: SOX on Mar 11, '05 12:31:34PM

No need for pasting! just copy the text, then execute the terminal script. It reads the pasteboard. Obviously the first time you execute the script there's some typeing. But other executions just require you to press up-arrow, return in the terminal window.

Would be nice to have a service for this instead but it might not be significantly more convenient.



[ Reply to This | # ]
Python Service
Authored by: Lankhmart on Mar 11, '05 01:06:36PM
For Python, there is PyService. (Complete with source code. A Perl user with a little bit of Cocoa knowledge could probably just make a couple of changes to the NSTask arguments.)

[ Reply to This | # ]