[pygtk] Close button demonstrating app, and questions

Khiraly khiraly123 at gmx.net
Sun Apr 30 22:50:36 WST 2006


Thanks so much your answer!

However I dont understand this line of code:
  def delete(self, widget, event=None, *arguments, **keywords):

What are the *arguments and **keywords? Its a python syntax? Can you
provide me an url?
There are C-like pointer in python?

Thought about the implementation:
According this email message:
http://www.daa.com.au/pipermail/pygtk/2004-December/009298.html
("Please, remember that callbacks assigned in connect_group must return 
True.  Otherwise GTK+ will segfault sooner or later.")

This method:
  def remove_current_book(self, *arguments, **keywords):
    page = self.notebook.get_current_page()
    if page != -1:
      self.notebook.remove_page(page)

Should end by return True I think. Am I wrong?
So:
  def remove_current_book(self, *arguments, **keywords):
    page = self.notebook.get_current_page()
    if page != -1:
      self.notebook.remove_page(page)
    return True

Best regards, 
 Khiraly



More information about the pygtk mailing list