[IronPython] TypeError: unbound method open must be called with ....

JoeSox joesox at gmail.com
Mon Mar 20 04:08:42 CET 2006


Hi,

Can someone possibly explain to me what is going on with the TypeError below?
I've tried the same calls in IDLE and it works.  Correct me if I am
wrong but webbrowser.py only uses os and sys. I don't understand what
<class webbrowser.WindowsDefault at 0x000000000000002B>
means. Thanks.

======
IronPython 1.0.2262 (Beta) on .NET 2.0.50727.42
Copyright (c) Microsoft Corporation. All rights reserved.
>>> import sys
>>> sys.path.append("C:\Python24\Tools\Scripts")
>>> sys.path.append("C:\Python24\Lib")
>>> import webbrowser
>>> webbrowser.WindowsDefault.open("http://www.microsoft.com")
Traceback (most recent call last):
  File , line 0, in input##399
TypeError: unbound method open must be called with <class
webbrowser.WindowsDefault at 0x000000000000002B> instance as first
argument (got str instance instead)
>>>
======

--
Joseph



More information about the Ironpython-users mailing list