Home > OS >  Is there abstract syntax tree (AST) in python extension module (files with suffix .so)?
Is there abstract syntax tree (AST) in python extension module (files with suffix .so)?

Time:11-23

I can check AST in python file:

python3 -m ast some_file.py

But, when I compile it with nuitka:

nuitka3 --module some_file.py

I get some_file.so extension module and when I run

python3 -m ast some_file.so

I get error.

So, question my is:

is there abstract syntax tree (AST) in python extension module?

CodePudding user response:

A .so is almost certainly a Linux or MacOSX Shared Object (as the tag indicates). It almost certainly does not contain Python byte code, the usual content is raw binary instructions in the format that your CPU understands.

Viewing the symbols in a .so file

  • Related