36 lines
892 B
Rust
36 lines
892 B
Rust
#![feature(unsafe_destructor)]
|
|
#![allow(unused_imports, dead_code, unused_variables)]
|
|
#![feature(associated_types)]
|
|
#![feature(globs)]
|
|
#![feature(slicing_syntax)]
|
|
#![feature(macro_rules)]
|
|
|
|
extern crate libc;
|
|
extern crate "python27-sys" as ffi;
|
|
pub use ffi::Py_ssize_t;
|
|
pub use err::{PyErr, PyResult};
|
|
pub use objects::*;
|
|
pub use err::exception_types::*;
|
|
pub use python::{Python, PythonObject, PythonObjectWithCheckedDowncast, PythonObjectWithTypeObject};
|
|
pub use pyptr::PyPtr;
|
|
pub use conversion::{FromPyObject, ToPyObject};
|
|
pub use objectprotocol::{ObjectProtocol};
|
|
|
|
mod python;
|
|
mod pyptr;
|
|
mod err;
|
|
mod conversion;
|
|
mod objects;
|
|
mod objectprotocol;
|
|
mod pythonrun;
|
|
|
|
#[test]
|
|
fn it_works() {
|
|
let gil = Python::acquire_gil();
|
|
let py = gil.python();
|
|
let sys = PyModule::import(py, "sys").unwrap();
|
|
let path = sys.as_object().getattr("path").unwrap();
|
|
println!("{0}", path);
|
|
}
|
|
|