constructor overwrite

2010-02-15 Thread Mug
hi ,i had a problem on constructor overwrite: i have something like: class obj: def __init__(self, x=100, y=None): if y is None: self.x=x else: self.y=y so i can call : objet = obj() # x=100 y=None or objet = obj(40) # x= 40 y=None but if i do : objet = obj('not cool'

initilize a memory zone in python

2009-08-30 Thread Mug
hello, i'm new in python, i used to program in C, i have a small problem, i tryed to do some serial port things manipulation with python. i have something like: import sys,termios fd = sys.stdin.fileno() term_conf=termios.tcgetattr(fd); now i want to modify the actuall values in term_conf zone

Re: initilize a memory zone in python

2009-08-30 Thread Mug
On Aug 30, 8:58 pm, "Diez B. Roggisch" wrote: > Mug schrieb: > > > hello, i'm new in python, i used to program in C, > > i have a small problem, i tryed to do some serial port things > > manipulation > > with python. > > i have something like: &