Quantcast
Channel: Python extension for WinDbg
Viewing all articles
Browse latest Browse all 1625

Commented Unassigned: Creating module object from unicode string [12775]

$
0
0
Python 2.7.3, pykd 0.2.0.27

I am trying to get information about all modules in my program, so I created a small Python script
```
from pykd import *
modules = dbgCommand("lm1m").split('\n')
for moduleName in modules:
mod = module(moduleName)
```

The error message I get is
```
Traceback (most recent call last):
File "<console>", line 1, in <module>
ArgumentError: Python argument types in
module.__init__(module, unicode)
did not match C++ signature:
__init__(class boost::python::api::object, unsigned __int64)
__init__(class boost::python::api::object, class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)
```

You can also reproduce it in the command promt by
```
module(u'ntdll')
```

I can "fix" it using
```
.encode('ascii', 'ignore')
```
on the unicode string.
Even if only ASCII is allowed for module names (unicode and even some other characters will be replaced by underscores), would it be nice if the module class supports unicode as input?
Comments: ** Comment from web user: kernelnet **

0.3.x is developped with full unicode support ( near all functions get and return unicode parameters ).
I'm not sure it is worth to extend 0.2 API now ( it is not so simply )


Viewing all articles
Browse latest Browse all 1625

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>