Converting strings in Python
Could you please post a bug? Could you please post what type of object do you have ( type(yourvar)
)?
Please check if you have a method partition(sep)
for this object ( dir(yourvar)
).
The method application partition
should look like this:
>>> us=u", Unicode String!"
>>> us.partition(' ')
(u'\u041f\u0440\u0438\u0432\u0435\u0442,', u' ', u'Unicode String!')
You can also try split
instead partition
:
>>> from string import split
>>> split(us,' ',1)
[u'\u041f\u0440\u0438\u0432\u0435\u0442,', u'Unicode String!']
source to share
If by CLR you mean .NET CLR , try using IronPython :
IronPython is a new implementation of the Python programming language that runs on .NET. It supports an interactive console with fully dynamic compilation. It integrates well with the rest of the .NET Framework and makes all .NET libraries available to Python programmers while maintaining full compatibility with the Python language.
In IronPython, loading (importing) and calling .NET dlls is well documented and straightforward.
source to share