pythonic

Crates.iopythonic
lib.rspythonic
version0.3.0
sourcesrc
created_at2016-06-03 18:14:17.975579
updated_at2016-06-03 20:38:56.680056
descriptionpythonic is a Rust AST builder that generates Python
homepage
repositoryhttps://git.cmacinfo.com/chris/pythonic
max_upload_size
id5275
size44,075
Chris MacNaughton (ChrisMacNaughton)

documentation

README

Pythonic

Usage

Creating Hello, world in Py thon is fairly simple, although a bit verbose:

let mut program = Block::new();
program.add_statement(
  Statement::FunctionCall(
    FunctionCall::new("print", vec![
      Statement::Argument(Argument::bare("Hello, world")
    ])
  )
)

println!("{}", program);

The above Rust would print:

print("Hello, world")
Commit count: 0

cargo fmt