Parse Python, serialize it and convert back to Python

Hi,

I want to do the following thing:
Python -> Rust object -> Text version of AST -> Rust object -> Python

I've already tried to do so with ruff and RustPython Parser, but none of them allow me to do the thing (without reworking them).

Any ideas?

What are those "Python" at each end? Python source code? Python object? Are you trying to make a python source to python source transformer?

The parser has an optional Parser/core/Cargo.toml at a5b08096a0b77e8f39cd6abdc998bb770dd0c79b · RustPython/Parser · GitHub serde feature which should allow your "text version of AST"

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.