Thanks a lot.
On Thu, Sep 13, 2018 at 5:24 PM, MRAB wrote:
> On 2018-09-13 21:50, Jason Qian via Python-list wrote:
>
>> Hey,
>>
>> Need some help on PyList.
>>
>>
>> #get path
>> PyObject *path = PyObject_GetAttrString(sys, "path");
>>
>> #new user path
>> PyObject* newPath = PyUnicode_DecodeUT
On 2018-09-13 21:50, Jason Qian via Python-list wrote:
Hey,
Need some help on PyList.
#get path
PyObject *path = PyObject_GetAttrString(sys, "path");
#new user path
PyObject* newPath = PyUnicode_DecodeUTF8(userPath, strlen( userPath ),
errors);
#append newPath to path
PyList_Append(path, ne
Hey,
Need some help on PyList.
#get path
PyObject *path = PyObject_GetAttrString(sys, "path");
#new user path
PyObject* newPath = PyUnicode_DecodeUTF8(userPath, strlen( userPath ),
errors);
#append newPath to path
PyList_Append(path, newPath);
How to check if the newPath is already in the pa