3 unstable releases
0.2.1 | Oct 30, 2022 |
---|---|
0.2.0 | Oct 30, 2022 |
0.1.0 | Oct 30, 2022 |
#2859 in Rust patterns
7KB
libpy
This library imports functions from the python standard library.
Examples
input! macro
use libpy::input;
fn main() {
let a = input!();
let b = input!("Enter your name: ");
println!("{}", a);
println!("{}", b);
}
int! macro
use libpy::int;
fn main() {
let a = int!();
let b = int!("42".to_string());
println!("{}", a);
println!("{}", b);
}
About
This project was created to make it easier for the programmer to work by importing functions familiar to him.
lib.rs
:
This is my first crate. Its task is to facilitate the programmer's work by allowing the use of the well-known function input()
.
This works the same way as in python, only you need to write !
, since this is a macro: input!()
or input!("Enter your name: ")
.