tkinter

2010-08-19 Thread Eric J. Van der Velden
Hello, I have python2.7 .I have compiled tcl en tk and installed them in my home directory, say /home/eric/tcl and /home/eric/tk . I have edited $ vi Modules/Setup ... _tkinter _tkinter.c tkappinit.c -DWITH_APPINIT \ -L/home/eric/tcl/lib \ -L/home/eric/tk/lib \ -I/home/eric/tcl/include \ -I/home/

__class__ of what

2010-08-12 Thread Eric J. Van der Velden
Hello, I have, class C: n=0 def __init__(s): __class__.n+=1 I do >>> C() This is fine. But of what thing I am taking the __class__ of? I can also do @staticmethod def p(): print(__class__.n) >>> C.p() 1 Thanks, Eric J. --

mi

2010-08-11 Thread Eric J. Van der Velden
Hello, I have these types, class A: def __init__(s): super().__init__() print("A") class B(A): def __init__(s): super().__init__() print("B") class C(A): def __init__(s): super().__init__()

__init__ as a lambda

2010-08-04 Thread Eric J. Van der Velden
Hello, Suppose class C: def __init__(self,name):self.name=name I was wondering if I could make the __init__ a lambda function, but class C: __init__=lambda self,self.name:None and then later, C('Hello') does not work; the first argument, self, is assigned all rigth, but you cannot write th

list.insert

2010-07-14 Thread Eric J. Van der Velden
Hi, I understand this: >>> l=[1,2,3] >>> l[1:2]=[8,9] >>> l [1,8,9,3] But how do you do this with list.insert? Thanks, Eric J. -- http://mail.python.org/mailman/listinfo/python-list