Tag Info

New answers tagged


Since VTE 0.38, vte_terminal_fork_command_full () has been renamed to vte_terminal_spawn_sync (). So if you are using newer versions, you have to change @ADcomp's answer into the following: terminal.spawn_sync( Vte.PtyFlags.DEFAULT, os.environ['HOME'], ["/bin/sh"], [], GLib.SpawnFlags.DO_NOT_REAP_CHILD, None, None, )


You miss an underscore in the webview methods. The correct ones are webview.go_back() and webview.go_forward(). Which means your code becomes: def on_backbutton_clicked(self, widget): self.webview.go_back() def on_forwardbutton_clicked(self, widget): self.webview.go_forward() See the linked documentation page for some more convenient methods, ...


You can use javascript to go back; i have found something here:http://tudorbarbu.ninja/pywebkitgtk-execute-javascript-from-python/ class WebView(webkit.WebView): def get_html(self): self.execute_script('history.go(-1|1)') ignore the next 2 lines i don't know why they were there? you may not need to return anything... html = ...

Top 50 recent answers are included