Spixmaster528
Cadet 1st Year
- Registriert
- März 2019
- Beiträge
- 13
Gegeben ist diese Funktion:
mit folgenden keyword-Parametern:
Code:
__init__(username, password, **kwargs)
- auto_patch: Patch the api objects to match the public API. Default: False
- drop_incompat_key: Remove api object keys that is not in the public API. Default: False
- timeout: Timeout interval in seconds. Default: 15
- api_url: Override the default api url base
- cookie: Saved cookie string from a previous session
- settings: A dict of settings from a previous session
- on_login: Callback after successful login
- proxy: Specify a proxy ex: ‘http://127.0.0.1:8888’ (ALPHA)
- proxy_handler: Specify your own proxy handler
Code:
#include <pybind11/embed.h> // everything needed for embedding
#include <iostream>
namespace py = pybind11;
int main()
{
py::scoped_interpreter guard{}; // start the interpreter and keep it alive
py::module calc = py::module::import("calc");
py::eek:bject result = calc.attr("__init__")("IGname", "IGpassword");
int i;
std::cin >> i;
}
Zuletzt bearbeitet: