Support both `std::string` and `std::wstring`
Update python wrapper