Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions mechanize/_mechanize.py
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,23 @@ def submit(self, *args, **kwds):
"""
return self.open(self.click(*args, **kwds))

def submit_novisit(self, *args, **kwds):
"""Submit current form without switching to new URL.

Browser state (including request, response, history, forms and links)
is left unchanged by calling this function.

The interface is the same as for .submit().

This is useful for things like fetching reports in a loop.

See also .open_novisit(), .retrieve().

"""
request = self.click(*args, **kwds)
request.visit = False
return self.open(request)

def click_link(self, link=None, **kwds):
"""Find a link and return a Request object for it.

Expand Down