osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to access the help page of SRE_Pattern?


Hi,

>>> import re
>>> prog=re.compile('[a-f]+')
>>> help(prog)

I can use the above command to access SRE_Pattern. But this involves
the creation of an object of the class.

I tried to directly access the class. But it does not work. Does
anybody know if there is a way to directly access the class help page?
Thanks.

>>> help(_sre.SRE_Pattern)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'SRE_Pattern'
>>> help(SRE_Pattern)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'SRE_Pattern' is not defined


-- 
Regards,
Peng