tion - but referenced it :)
> Your workaround might be implementable using a metaclass in a more
> conveinient way, but I'm not sure-footed enough with metaclasses to
> provide a solution out of my head now.
That would be fun ;-)
--
Christian Joergensen | Linux, programming or web consult
in clsdict.iteritems():
> if isinstance(value,type):
> clsdict[key] = type(value.__name__,(value,),{})
> type.__new__(cls,name,bases,clsdict)
>
>
> class A(object):
> __metaclasS__ = AutoSubclassMetaclass
> class C(object):
&
"C", (object,), {'foobar': 60})
Instead of:
>>> B.C.foobar = 60
Thanks,
--
Christian Joergensen | Linux, programming or web consultancy
http://www.razor.dk | Visit us at: http://www.gmta.info
--
http://mail.python.org/mailman/listinfo/python-list
r workstation and scp/sftp it to the remote server.
--
Christian Joergensen | Linux, programming or web consultancy
http://www.razor.dk | Visit us at: http://www.gmta.info
--
http://mail.python.org/mailman/listinfo/python-list
ributeError, etc.
See http://rgruet.free.fr/PQR25/PQR2.5.html#BuiltInExc
I would guess you're looking for StandardError.
--
Christian Joergensen | Linux, programming or web consultancy
http://www.razor.dk | Visit us at: http://www.gmta.info
--
http://mail.python.org/mailman/listinfo/python-list
s such a function. I would have written
it using a list comprehension.
>>> import re
>>> ll = ('a', 'b', 's1', 's2', '3s')
>>> p = re.compile('^s.*')
>>> newList = [s for s in ll if p.match(s)]
>>> newList
['s1', 's2']
--
Christian Joergensen | Linux, programming or web consultancy
http://www.razor.dk | Visit us at: http://www.gmta.info
--
http://mail.python.org/mailman/listinfo/python-list
6]
>>> print ','.join(map(str, list))
1,2,3,4,5,6
--
Christian Joergensen | Linux, programming or web consultancy
http://www.razor.dk | Visit us at: http://www.gmta.info
--
http://mail.python.org/mailman/listinfo/python-list
mportError: No module named i
>
> But it seems that import donot know what is i ? why?
Try using __import__(i) instead.
--
Christian Joergensen | Linux, programming or web consultancy
http://www.razor.dk | Visit us at: http://www.gmta.info
--
http://mail.python.org/mailman/listinfo/python-list