Example #1
0
PythonDictionary::PythonDictionary (const PythonObject &object) :
    PythonObject()
{
    Reset(object.GetPythonObject()); // Use "Reset()" to ensure that py_obj is a dictionary
}
Example #2
0
void
PythonDictionary::SetItemForKey (const PythonString &key, const PythonObject &value)
{
    if (m_py_obj && key && value)
        PyDict_SetItem(m_py_obj, key.GetPythonObject(), value.GetPythonObject());
}
Example #3
0
void
PythonList::AppendItem (const PythonObject &object)
{
    if (m_py_obj && object)
        PyList_Append(m_py_obj, object.GetPythonObject());
}
Example #4
0
void
PythonList::SetItemAtIndex (uint32_t index, const PythonObject & object)
{
    if (m_py_obj && object)
        PyList_SetItem(m_py_obj, index, object.GetPythonObject());
}
Example #5
0
PythonList::PythonList (const PythonObject &object) :
    PythonObject()
{
    Reset(object.GetPythonObject()); // Use "Reset()" to ensure that py_obj is a list
}
Example #6
0
PythonInteger::PythonInteger (const PythonObject &object) :
    PythonObject()
{
    Reset(object.GetPythonObject()); // Use "Reset()" to ensure that py_obj is a integer type
}
Example #7
0
PythonString::PythonString (const PythonObject &object) :
    PythonObject()
{
    Reset(object.GetPythonObject()); // Use "Reset()" to ensure that py_obj is a string
}