webbrowser.open()

webbrowser.open(url, new=0, autoraise=True) Display url using the default browser. If new is 0, the url is opened in the same browser window if possible. If new is 1, a new browser window is opened if possible. If new is 2, a new browser page (“tab”) is opened if possible. If autoraise is True, the window is raised if possible (note that under many window managers this will occur regardless of the setting of this variable). Note that on some platforms, trying to open a filename using this fu

webbrowser.get()

webbrowser.get(using=None) Return a controller object for the browser type using. If using is None, return a controller for a default browser appropriate to the caller’s environment.

webbrowser.Error

exception webbrowser.Error Exception raised when a browser control error occurs.

webbrowser.controller.open_new_tab()

controller.open_new_tab(url) Open url in a new page (“tab”) of the browser handled by this controller, if possible, otherwise equivalent to open_new().

webbrowser.controller.open_new()

controller.open_new(url) Open url in a new window of the browser handled by this controller, if possible, otherwise, open url in the only browser window. Alias open_new().

webbrowser.controller.open()

controller.open(url, new=0, autoraise=True) Display url using the browser handled by this controller. If new is 1, a new browser window is opened if possible. If new is 2, a new browser page (“tab”) is opened if possible.

weakref.WeakValueDictionary.valuerefs()

WeakValueDictionary.valuerefs() Return an iterable of the weak references to the values.

weakref.WeakValueDictionary

class weakref.WeakValueDictionary([dict]) Mapping class that references values weakly. Entries in the dictionary will be discarded when no strong reference to the value exists any more. Note Caution: Because a WeakValueDictionary is built on top of a Python dictionary, it must not change size when iterating over it. This can be difficult to ensure for a WeakValueDictionary because actions performed by the program during iteration may cause items in the dictionary to vanish “by magic” (as a

weakref.WeakSet

class weakref.WeakSet([elements]) Set class that keeps weak references to its elements. An element will be discarded when no strong reference to it exists any more.

weakref.WeakMethod

class weakref.WeakMethod(method) A custom ref subclass which simulates a weak reference to a bound method (i.e., a method defined on a class and looked up on an instance). Since a bound method is ephemeral, a standard weak reference cannot keep hold of it. WeakMethod has special code to recreate the bound method until either the object or the original function dies: >>> class C: ... def method(self): ... print("method called!") ... >>> c = C() >>> r = w