A python question...
Gary Sublett
gsublett
Mon May 17 12:01:52 PDT 2004
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Sun, 2 May 2004 18:05:07 -0400
Jerry McBride <mcbrides9 at comcast.net> wrote:
>
> Ok... I've just begun my python training and it's... well... going...
> :')
>
> I've a small question for you guys... Let's say there's a wonderful
> new module out there that I want to import and use in my python
> programs... How does one discover what methods are in the module?
>
[gsublett at paradise gsublett]$ python
Python 2.2.2 (#1, Feb 24 2003, 19:13:11)
[GCC 3.2.2 20030222 (Red Hat Linux 3.2.2-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import string
>>> dir(string)
['_StringTypes', '__builtins__', '__doc__', '__file__', '__name__',
'_float', '_idmap', '_idmapL', '_int', '_long', 'ascii_letters',
'ascii_lowercase', 'ascii_uppercase', 'atof', 'atof_error', 'atoi',
'atoi_error', 'atol', 'atol_error', 'capitalize', 'capwords', 'center',
'count', 'digits', 'expandtabs', 'find', 'hexdigits', 'index',
'index_error', 'join', 'joinfields', 'letters', 'ljust', 'lower',
'lowercase', 'lstrip', 'maketrans', 'octdigits', 'printable',
'punctuation', 'replace', 'rfind', 'rindex', 'rjust', 'rstrip', 'split',
'plitfields', 'strip', 'swapcase', 'translate', 'upper', 'uppercase',
'whitespace', 'zfill']
- ---
Gary S
19:02:48 up 7 days, 7:58, 3 users, load average: 0.08, 0.16, 0.11
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQFAlX5NsU4FV1lLQCQRAqWuAKCRLiS2ezzAcPRDeNkx7hgnzdvXlwCeLJOj
G7H6JOuYl0ViY0jI3E0KQGU=
=hWAc
-----END PGP SIGNATURE-----
More information about the Linux-users
mailing list