[Baypiggies] How to find the constants availiabe for a given module
Alfred Appiah
aappiah at yahoo.com
Tue Feb 16 03:29:46 CET 2010
Ahh ok I see why it was not working when I was running 'help(string)' / 'dir(string)' etc and getting the message below .
"NameError: name 'string' is not defined"..I forgot to add "import string"
works now .
cheers Al
--- On Mon, 2/15/10, Alan Westbrook <voidref at gmail.com> wrote:
> From: Alan Westbrook <voidref at gmail.com>
> Subject: Re: [Baypiggies] How to find the constants availiabe for a given module
> To: aappiah at yahoo.com
> Cc: baypiggies at python.org
> Date: Monday, February 15, 2010, 6:12 PM
> Oh, also
>
> help(string)
>
> On Mon, Feb 15, 2010 at 6:12 PM, Alan Westbrook <voidref at gmail.com>
> wrote:
> > dir(string) might be what you are looking for.
> >
> > On Mon, Feb 15, 2010 at 6:09 PM, Alfred Appiah <aappiah at yahoo.com>
> wrote:
> >> Hi,
> >>
> >> I am new to python and wanted to know if there a
> way to find out all the constants, functions and classes
> available for a given module.
> >>
> >> For example the string module supports the
> following constants and functions,
> >>
> >> string.letters,
> >> string.digits
> >> string.whitespace
> >> string.capwords()
> >>
> >> and the only way I have been able to find out the
> classes and functions available is by reading the python
> docs , I.E http://docs.python.org/library/string.html . Are there
> commands I can type in the interpreter to get this
> information also ?
> >>
> >> Cheers Alfred
> >> _______________________________________________
> >> Baypiggies mailing list
> >> Baypiggies at python.org
> >> To change your subscription options or
> unsubscribe:
> >> http://mail.python.org/mailman/listinfo/baypiggies
> >>
> >
>
More information about the Baypiggies
mailing list