[issue14138] Ctrl-C does not terminate GTK3 Gtk.main() loop when program run from command line
Narnie Harshoe signupnar...@gmail.com added the comment: Understood. I didn't realize it was 3rd party. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14138 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14137] GTK3 Segmentation fault from Warning: g_object_notify: assertion `G_IS_OBJECT (object)' failed
Narnie Harshoe signupnar...@gmail.com added the comment: Understood. Didn't realize pythonized GTK was 3rd party. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14137 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14137] GTK3 Segmentation fault from Warning: g_object_notify: assertion `G_IS_OBJECT (object)' failed
Narnie Harshoe signupnar...@gmail.com added the comment: PyGtk and the python bindings for GTK3 seem to be separate entities. I could find nothing about GTK3 on pygtk.org. Any ideas where the bug reporting goes for the python bindings for GTK3? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14137 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14137] GTK3 Segmentation fault from Warning: g_object_notify: assertion `G_IS_OBJECT (object)' failed
New submission from Narnie Harshoe signupnar...@gmail.com: Using the following code for a Gtk.CellRenderSpin results in the following error after changing the spin button several times. The error is: /usr/lib/python2.7/dist-packages/gi/types.py:43: Warning: g_object_notify: assertion `G_IS_OBJECT (object)' failed return info.invoke(*args, **kwargs) Segmentation fault #! /usr/bin/env python # -*- coding: utf-8 -*- from gi.repository import Gtk class CellRendererSpinWindow(Gtk.Window): def __init__(self): Gtk.Window.__init__(self, title=CellRendererSpin Example) self.set_default_size(200, 200) self.liststore = Gtk.ListStore(str, int) self.liststore.append([Oranges, 5]) self.liststore.append([Apples, 4]) self.liststore.append([Bananas, 2]) treeview = Gtk.TreeView(model=self.liststore) renderer_text = Gtk.CellRendererText() column_text = Gtk.TreeViewColumn(Fruit, renderer_text, text=0) treeview.append_column(column_text) renderer_spin = Gtk.CellRendererSpin() renderer_spin.connect(edited, self.on_amount_edited) renderer_spin.set_property(editable, True) adjustment = Gtk.Adjustment(0, 0, 100, 1, 10, 0) renderer_spin.set_property(adjustment, adjustment) column_spin = Gtk.TreeViewColumn(Amount, renderer_spin, text=1) treeview.append_column(column_spin) self.add(treeview) def on_amount_edited(self, widget, path, value): self.liststore[path][1] = int(value) win = CellRendererSpinWindow() win.connect(delete-event, Gtk.main_quit) win.show_all() Gtk.main() This code comes from http://python-gtk-3-tutorial.readthedocs.org/en/latest/cellrenderers.html It is confirmed by another user via Ubuntu launchpad at https://bugs.launchpad.net/ubuntu/+source/pygobject/+bug/908889 My system is a Debian system tracking debian testing. Exact python --version is Python 2.7.2+ -- components: None messages: 154426 nosy: Narnie.Harshoe priority: normal severity: normal status: open title: GTK3 Segmentation fault from Warning: g_object_notify: assertion `G_IS_OBJECT (object)' failed type: crash versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14137 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14138] Ctrl-C does not terminate GTK3 Gtk.main() loop when program run from command line
New submission from Narnie Harshoe signupnar...@gmail.com: In a normal python program, Ctrl-C will set up a KeyboardInterrupt and terminate the program. This works with a normal python script, including GTK2 gtk.main(), but GTK3 Gtk.main() (even when used in a more robust GTK program that coded below) will not terminate with Ctrl-C requiring a Ctrl-Z and killing the job to terminate. See the commmand line output below: $ python -c while True: pass ^CTraceback (most recent call last): File string, line 1, in module KeyboardInterrupt $ python -c import gtk gtk.main() ^CTraceback (most recent call last): File string, line 2, in module KeyboardInterrupt $ python -c from gi.repository import Gtk Gtk.main() ^C ^C ^Z [1]+ Stopped python -c from gi.repository import Gtk Gtk.main() $ kill %1 [1]+ Stopped python -c from gi.repository import Gtk Gtk.main() The behaviour under Gtk.main() should be changed to respond to the KeyboardInterrupt. -- components: None messages: 154427 nosy: Narnie.Harshoe priority: normal severity: normal status: open title: Ctrl-C does not terminate GTK3 Gtk.main() loop when program run from command line versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14138 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9265] Incorrect name passed as arg[0] when shell=True and executable specified
Narnie Harshoe signupli...@gmail.com added the comment: David, working as fast at learning Python as I can and loving it! Stefan, thanks for the patches. Thanks guys, Narnie -- versions: -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9265 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9265] Incorrect name passed as arg[0] when shell=True and executable specified
Narnie Harshoe signupli...@gmail.com added the comment: Hello, I am impressed by the activity here. I am a new programmer and cutting my teeth with python. I wish I knew how to do a patch and write unit tests, but I'm just not there yet. I can show a test case in this fashion where it fails. First I prove that /bin/sh is /bin/sh (er, dash) and /bin/bash is /bin/bash. Then it can be seen that when executable is set as /bin/bash and there is a shell error, that it returns a shell error from /bin/sh, not from /bin/bash. I see there are patches here that should fix it, but for those wanting to see the buggy code in action, here it is using the fact that echo was mistyped as echos to raise a shell error (but shell=True so it doesn't raise an OSError exception). _ in shell terminal: $ file /bin/bash /bin/bash: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, stripped $ file /bin/sh /bin/sh: symbolic link to `dash' $ file /bin/dash /bin/dash: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, stripped in python interactive interpreter shell = Popen('echos', shell=True, executable=/bin/bash, stdin=PIPE, stderr=PIPE, stdout=PIPE) shell.communicate() ('', '/bin/sh: echos: command not found\n') shell = Popen('echos', shell=True, executable=/bin/bash, stdin=PIPE, stderr=PIPE, stdout=PIPE) shell.communicate() ('', '/bin/bash: echos: command not found\n') Thank you for working on this so quickly. This is truly an amazing community. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9265 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9265] Incorrect name passed as arg[0] when shell=True and executable specified
Narnie Harshoe signupli...@gmail.com added the comment: I'm sorry, but the last lines in the interpreter reflect my code changes which seemed to not be sufficient, but it shows that just for this case at least, it corrects it and allows it to be run in /bin/bash shells (much of my shell code is bash since I'm linux only and this is usually available and I make use of c-like math or incrementors like $(( x++ )) in the shell code (I know, I know, I should make my code more portable such that it can run on /bin/sh, but I'm lazy). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9265 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9265] Can choose other shell in subprocess module. Includes fix.
New submission from Narnie Harshoe signupli...@gmail.com: Popen from the subprocess module when called with shell=True and executable=/bin/bash still runs in the /bin/sh shell. The error has been found and corrected in the subprocess module and is as follows: change: lines 1018-1022 for python v 2.6 lines 1092-1096 for python v 2.7 lines 1046-1050 for python v 3.1 from this: if shell: args = [/bin/sh, -c] + args if executable is None: executable = args[0] to this: if shell: if executable is None: args = [/bin/sh, -c] + args executable = args[0] else: args = [executable, -c] + args #if executable is None: #executable = args[0] Of course the last 2 lines can just be deleted but were left in to better highlight the change. This change corrects the bug allowing shell=True and executable=/bin/bash to run in a bash shell or any other shell sub'd for /bin/bash. Hope this will make it into the module. I've included my temp fix which I have simply called subprocess2 for my purposes for v 2.6. -- components: Library (Lib) files: subprocess2.py messages: 110346 nosy: narnie priority: normal severity: normal status: open title: Can choose other shell in subprocess module. Includes fix. type: behavior versions: Python 2.6, Python 2.7, Python 3.1 Added file: http://bugs.python.org/file18010/subprocess2.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9265 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9265] Can't choose other shell in subprocess module. Includes fix.
Changes by Narnie Harshoe signupli...@gmail.com: -- title: Can choose other shell in subprocess module. Includes fix. - Can't choose other shell in subprocess module. Includes fix. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9265 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com