Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: How to use Perl to decompose Python functions into a CSV?

by LanX (Saint)
on Jul 01, 2019 at 21:28 UTC ( [id://11102276]=note: print w/replies, xml ) Need Help??


in reply to How to use Perl to decompose Python functions into a CSV?

> better way to get ALL of these.

"When in Rome, do as the Roman's do."

I wouldn't try to hack a Python parser with regexes.

When confronted with a similar task for Perl I'd try to hack B::Deparse or PPI to do the heavy lifting for me.

I'm no expert for Python and dunno the most similar tool to B::Deparse, but a short search showed me they have

  • Lint tools
  • Pretty printers
  • an AST tree class
  • Decompilers

... so plenty of possibilities for code analysis.

Maybe you should ask at a Python board for assistance?

HTH! :)

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11102276]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2024-03-28 10:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found