Message181611
Can you try to following command to get the size in bytes of the wchar_t type?
>>> import types
>>> ctypes.sizeof(ctypes.c_wchar)
4
You can also use _PyObject_Dump() to dump your string:
>>> import ctypes
>>> x="abc"
>>> _PyObject_Dump=ctypes.pythonapi._PyObject_Dump
>>> _PyObject_Dump.argtypes=(ctypes.py_object,)
>>> _PyObject_Dump(x)
object : 'abc'
type : str
refcount: 5
address : 0xb70bf980
48
Then you can use _PyObject_Dump() on your string.
You may also try: print(list(dirname)).
It's really strange that something very common like string concatenation returns an invalid string. |
|
Date |
User |
Action |
Args |
2013-02-07 14:38:19 | vstinner | set | recipients:
+ vstinner, loewis, georg.brandl, mark.dickinson, ezio.melotti, flox, pepalogik |
2013-02-07 14:38:19 | vstinner | set | messageid: <1360247899.35.0.122514964661.issue17137@psf.upfronthosting.co.za> |
2013-02-07 14:38:19 | vstinner | link | issue17137 messages |
2013-02-07 14:38:19 | vstinner | create | |
|