Settings

Theme

Perl in Python

wildfish.com

4 points by kingrolo 6 years ago · 1 comment

Reader

dalke 6 years ago

I did something somewhat like this about 10 years ago, at http://www.dalkescientific.com/writings/diary/archive/2008/0... :

  for line in open("python_yacc.py"):
      if line =~ m/def (?P<name>\w+) *(?P<args>\(.*\)) *:/:
          print repr($1), repr($args)
I did not use import hooks, like this project does.

It got appreciative hisses when I did a lightning talk about it at a PyCon.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection