[Tutor] incomprehension in type of classes.

2005-04-22 Thread Cedric BRINER
at you are currently debugging in. Quesion 2 ----- why type of (CYear(2005)) and type(CYearDerived) doesn't give the same type ??? -- Cedric BRINER ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] incomprehension in type of classes.

2005-04-23 Thread Cedric BRINER
aaah... I din't know that there was two kinds of classes. So you mean that, now the new style object should be like: class A(object): pass >>> class A: pass ... >>> class B(object): pass ... >>> a=A() >>> b=B() I see that dir (b) compare to di

[Tutor] creation of a module

2005-05-13 Thread Cedric BRINER
nction like: assign('x',3) -- Cedric BRINER ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] creation of a module

2005-05-13 Thread Cedric BRINER
lassname: #filename='a', classname='classA' filename=classname.replace('class','').lower() #from filename import classname #can't do this module=__import__(filename, gloabls(), locals(), [classname]) classDefinition=getattr(module,classname) assign(classname,classDefinition) In this way, when I'll do an import FWobs I'll get: MyModule.classA .classB .classC . . thanks for your help ! -- Cedric BRINER ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] creation of a module

2005-05-17 Thread Cedric BRINER
ou do just want to export a single set of services from a > single import it would be much simpler to just put them all > in a single module! And then you can hide the exposed names > using the Python naming convention of prefixing with '_' > or ' __'. > > Of course if its a very large set of services a package > is better, but then you probably should expose the sub modules > too. NAmespaces are one of Pythons best features - they are > simple to use and very effective both in controlling program > structure and in aiding debugging, its probabnly best to use > them as intended rather than trying to force them to work > differently. > > All IMHO of course! :-) > > Alan G thanks for your time. Ced. -- Cedric BRINER ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Testing for commandline args

2005-05-17 Thread Cedric BRINER
> Also, I hear that optparse is much better than getopt. this is a true pleasure to work with optparse. It was included in python2.3 and was primarly called python-optik Ced. -- Cedric BRINER ___ Tutor maillist - Tutor@python.org h

Re: [Tutor] Looking for HOWTO's

2005-06-03 Thread Cedric BRINER
Maybe this is Off-Topic but I found recently a perfect repository of python tutorials at: http://www.awaretek.com/tutorials.html Ced. -- Cedric BRINER ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] interactif or not

2005-06-03 Thread Cedric BRINER
Ced. -- Cedric BRINER ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] interactif or not

2005-06-07 Thread Cedric BRINER
hon, file objects have an isatty() > method that will return True or False. > > import sys > isinteractive = sys.stdin.isatty() > if isinteractive: > ... > else: > ... > tested and it works ! Ced. -- Cedric BRINER ___

[Tutor] python and database

2005-07-07 Thread Cedric BRINER
pgsql. Ced. -- Cedric BRINER ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] module with static global

2005-07-12 Thread Cedric BRINER
give an eyes to sqlobject.org. -- Cedric BRINER ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] SQL headache with column

2005-07-20 Thread Cedric BRINER
did you heard about sqlobject ? give a try...http://www.sqlobject.org/ Ced. -- Cedric BRINER ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] python learning

2005-07-28 Thread Cedric BRINER
pace. So the only way to destruct such module, will be within the module. I found that such module act has a singleton Ced. -- Cedric BRINER Geneva - Switzerland ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Basic class inheritance

2005-07-28 Thread Cedric BRINER
ss A(object): def __init__(self, blank=False, editable=True, name='foo'): self.blank = blank self.editable = editable self.name = name class B(A): def __init__(self, blank=True, editable=True, name='foo'): super(B, self).__init__(b

[Tutor] uncomprehension on RE

2007-09-19 Thread cedric briner
Hello, I do not understand the behaviour of this: import re re.search('(a)*','aaa').groups() ('a',) I was thinking that the ``*'' will operate on the group delimited by the parenthesis. And so, I was expecting this result: ('a', 'a'

Re: [Tutor] uncomprehension on RE

2007-09-19 Thread cedric briner
Kent Johnson wrote: > cedric briner wrote: >> Hello, >> >> I do not understand the behaviour of this: >> >> import re >> re.search('(a)*','aaa').groups() >> ('a',) >> >> I was thinking that the ``*''

Re: [Tutor] uncomprehension on RE

2007-09-20 Thread cedric briner
Kent Johnson wrote: > cedric briner wrote: >> To let you know, I'm writing a script to generate bind9 configuration >> from a nis hosts table. So I was trying in a one re to catch from this: >> >> [ ...] [# comment] >> e.g: >> 10.12.23.45 host

Re: [Tutor] uncomprehension on RE

2007-09-20 Thread cedric briner
Stephen Nelson-Smith wrote: > On 9/20/07, cedric briner <[EMAIL PROTECTED]> wrote: > >> To let you know, I'm writing a script to generate bind9 configuration >> from a nis hosts table. So I was trying in a one re to catch from this: >> >> [ ...] [#

[Tutor] tree/node class/module

2008-01-15 Thread cedric briner
idn't found any class/modules which implements trees, with some comments, and small examples. Am I just blind ??? I'm looking for a tree of object which will give me stuff like: - sibling - parent - children - find - insert Do you have any pointers ?? Ced. -- Cedri

Re: [Tutor] tree/node class/module

2008-01-15 Thread cedric briner
usefull page > http://www.velocityreviews.com/forums/t355467-tree-and-graph-structures-in-python.html > thanks again Ced. -- Cedric BRINER Geneva - Switzerland ___ Tutor maillist - Tutor@python.org http://mail.python.org/m

Re: [Tutor] IDEs

2005-09-20 Thread Cedric BRINER
what about eric3 ? http://www.die-offenbachs.de/detlev/eric3.html Ced. -- Cedric BRINER Geneva - Switzerland ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Python DB

2005-09-22 Thread Cedric BRINER
I love sqlobject.org it this a wrapper between many sql implementation (mysql, postgresql..) and python. get a look. Ced. -- Cedric BRINER Geneva - Switzerland ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] cas and python

2005-12-07 Thread Cedric BRINER
hi, does one of you knows if there is a python module which implements CAS(Central Authentication Service): https://clearinghouse.ja-sig.org/wiki/display/CAS/Home thanks in advance Ced. -- Cedric BRINER Geneva - Switzerland ___ Tutor maillist

[Tutor] ldap client

2006-03-14 Thread Cedric BRINER
debian/sarge hello, I'm wanting to interogate an ldap server to fetch informations. so I'm looking for a python2.4 ldap client. And the only I've found is python2.4-ldaptor. Does some of you knows an good ldap client which use SSL ? Ced. -- Cedric BRINER Genev