Re: [Tutor] why i < j is True, j < k is False

2012-05-04 Thread Lion Chen
于 2012年05月04日 22:12, Dave Angel 写道: On 05/04/2012 09:29 AM, Lion Chen wrote: Hi, All, here are the codes: class a: pass i = a () j = a () k = a () i< j returns True j< k returns False why? Lion Chen ___ Tutor maillist - Tutor@python.

Re: [Tutor] why i < j is True, j < k is False

2012-05-04 Thread Lion Chen
On Fri, May 4, 2012 at 9:29 AM, Lion Chen wrote: Hi, All, here are the codes: class a: pass i = a () j = a () k = a () i< j returns True j< k returns False why? Lion Chen ___ Tutor maillist - Tutor@python.org To unsubscribe or

[Tutor] why i < j is True, j < k is False

2012-05-04 Thread Lion Chen
Hi, All, here are the codes: class a: pass i = a () j = a () k = a () i < j returns True j < k returns False why? Lion Chen ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/m

Re: [Tutor] why list is not thread-safe, but deque and queue are thread-safe?

2012-05-02 Thread Lion Chen
deque is not thread-safe either. right? http://stackoverflow.com/questions/6319207/are-lists-thread-safe On Wed, May 2, 2012 at 7:58 PM, Lion Chen <mailto:chnlio...@gmail.com>> wrote: Hi, All, i can not understand why list is not thread-safe, but deque and queue a

[Tutor] why list is not thread-safe, but deque and queue are thread-safe?

2012-05-02 Thread Lion Chen
Hi, All, i can not understand why list is not thread-safe, but deque and queue are thread-safe? that's all. thanks. Lion Chen ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/lis

[Tutor] gtk.TreeView displays all right on Windows, but can't see the values on Ubuntu

2012-04-24 Thread Lion Chen
lumn 2 txt_column = gtk.TreeViewColumn("Calculation Results ", txt_renderer, text=2) self.results_view.append_column(bt_column) self.results_view.append_column(txt_column) self.results_view.show() return self.results_view #in class LionCalc def __init__(self): .. self.results_view = Resul

Re: [Tutor] why gtk.Entry does not give me right answers?

2012-04-23 Thread Lion Chen
于 2012年04月23日 23:08, Steven D'Aprano 写道: Lion Chen wrote: Hi, All, i am trying write a calculator, now normal calculation works ok. but if i enter long numbers, for example 33 + 7, it gives me "12". there are 18 "3"s, if the le

[Tutor] why gtk.Entry does not give me right answers?

2012-04-23 Thread Lion Chen
Hi, All, i am trying write a calculator, now normal calculation works ok. but if i enter long numbers, for example 33 + 7, it gives me "12". there are 18 "3"s, if the length is more than 17, the calculation will be wrong on Windows and Ubuntu. the following is

[Tutor] How to use g_timeout_add () function?

2012-04-06 Thread Lion Chen
function: my_id = g_timeout_add(500, myfunction()) or: my_id = gtk.g_timeout_add(500, myfunction()) everytime i run the program, it prompted me a message like modules do not have g_timeout_add() attribute. so i still have to use gtk_timeout_add anybody help