Dino Viehland a écrit :
.NET only has unicode strings as well so that's likely not the problem - it's
really just a problem when dealing w/ pre-existing Python code not other .NET
code.
ok
Could something earlier be different? You might be able to get some ideas by
looking at diagMgr.BrowseDiagnosticLog.__doc__ if you haven't already.
nothing clear for me:
>>>help(diagMgr.BrowseDiagnosticLog)
Help on builtin_function_or_method in module __builtin__
| <property# __doc__ on builtin_function_or_method>
|
| Data and other attributes defined here:
|
| __call__(...)
| x.__call__(...) <==> x(...)
| Property __doc__
| Get: str Documentation(self)
|
| __eq__(...)
| x.__eq__(y) <==> x==y
| __getitem__(...)
| object get_Item(self, object key)
| __init__(...)
| x.__init__(...) initializes x; see x.__class__.__doc__
for signature
| x.__init__(...) initializes x; see x.__class__.__doc__
for signature
| Property __name__
| Get: str Name(self)
|
| __new__(...)
| T.__new__(S, ...) -> a new object with type S, a subtype
of T
| Property __self__
| Get: object Self(self)
|
in Perl the code is slightly different
# get ServiceContent
my $content = Vim::get_service_content();
my $diagMgr = Vim::get_view(mo_ref => $content->diagnosticManager);
# Obtain the last line of the logfile by setting an arbitrarily large
# line number as the starting point
my $log = $diagMgr->BrowseDiagnosticLog(
key => "hostd",
start => "999999999");
my $lineEnd = $log->lineEnd;
thanks for your answers
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of jean-marc
pouchoulon
Sent: Thursday, September 11, 2008 3:35 PM
To: users@lists.ironpython.com
Subject: [IronPython] unicode problem with vmware api
Helo ironpython list ,
I'm trying to use ironpython with the vi-toolkit api for .net
The C# code looks like that:
DiagnosticManager diagMgr = (DiagnosticManager)
client.GetView(client.ServiceContent.DiagnosticManager, null);
DiagnosticManagerLogHeader log = diagMgr.BrowseDiagnosticLog(null,
"hostd", 999999999, null);
I "translate" these lines in ironpython code:
diagMgr = client.GetView(client.ServiceContent.DiagnosticManager, None)
diagMgrLog = diagMgr.BrowseDiagnosticLog(None, "hostd", 999999999, None)
unfortunately I've got an error on hostd key:
"A specified parameter was not correct. key"
I read that ironpython has only unicode string and I suppose that the
problem is here.
is there is a way to transform "hostd" in byte strings ?
thanks for your help.
jean-marc pouchoulon
_______________________________________________
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
_______________________________________________
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
_______________________________________________
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com