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
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
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:
>>
>> [ ...] [#
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
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 ``*''
, 'a')
Is there something I'am missing ?
Ced.
--
Cedric BRINER
Geneva - Switzerland
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
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
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
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
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
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
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
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
give an eyes to sqlobject.org.
--
Cedric BRINER
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
pgsql.
Ced.
--
Cedric BRINER
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
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
___
Ced.
--
Cedric BRINER
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
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
> 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
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
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
nction like:
assign('x',3)
--
Cedric BRINER
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
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
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
7;c'
In fact, what I really need is the ability to push a dictionary (which
can contain unicode) in a postgres database.
and the sql command given are in unicode. Thus I need to transform a
dictionnary--to-->unicode and then, do the inverse operation
unicode--to-->dictionnary
Cedric BRINER
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
function to initialize a dictionnary
so
dict.__init__(self...) initialize the dictionnary `self'. Which work
because self derive from a dictionnary...
I got it !
I was really lost because I was not clearly making a difference between
the class: ``
impleUnderscore
3-
in the definition of getCount we saw that the parameter is `cls'.
what does that mean???
4-
I just realize when writing this email that SuperDict is also an object.
and
type(SuperDict)
WOW
Cedric BRINER
___
Tutor maillist - Tu
1, in ?
> UnicodeDecodeError: 'ascii' codec can't decode byte 0x80 in position 0:
> ordinal not in range(128)
> ##
this is it!
> but again, I hate guessing. *grin*
Sorry for this :(
> Show us exactly what you're seeing as an error message: don't just
I'd like to *serialize* it with pickle and that the output format
will be of type unicode.
unicode(pickle.dumps(a)) doesn't work !
or
pickle.dumps(a,protocol=2,bin='V')
doesn't seem to work :(
what am I doing wrong ??
Cedric BRINER
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
e"
sys.stdout.flush()
content = u'c\xe9dric'
print content
#-
when I invoke it from my xterm, I get:
> python cedric.py
Content-Type: text/html
hipo'potame
cédric
but the same does not work on apache:
/home/system/briner/obsadminwww/cedric.py
30 matches
Mail list logo