capwords (WAS: [Newby] question about modules)

2004-12-10 Thread Steven Bethard
Jon wrote: As far as I can tell from the online docs, "capwords" should be defined in the built-in "regex" module. Why is it telling me that capwords is not defined? Hmm... are you looking instead for "capwords" from the string module? >>> s = """\ ... Well, he's... ... he's, ah... ... probably pi

Re: [Newby] question about modules

2004-12-10 Thread Steven Bethard
Jon wrote: The following four lines of code: import sys, os, re sentence = raw_input("Enter a sentence: ") capwords (sentence) print sentence gives me the following error: NameError: name 'capwords' is not defined As far as I can tell from the online docs, "capwords" should be defined in the buil

Re: [Newby] question about modules

2004-12-10 Thread James Stroud
Is it in "regex" or "re"? If in "re" then: re.capwords(sentence) If in "regex", then: regex.capwords(sentence) You can also do from re import * then you will not have to prefix. But careful not to clutter your namespace. On Friday 10 December 2004 10:29 am, Jon wrote: > Hi, > > The followin

RE: [Newby] question about modules

2004-12-10 Thread Batista, Facundo
Title: RE: [Newby] question about modules [Jon] #- gives me the following error:  NameError: name 'capwords' is #- not defined #- #- As far as I can tell from the online docs, "capwords" should #- be defined in #- the built-in "regex" module.  Why is it t

[Newby] question about modules

2004-12-10 Thread Jon
Hi, The following four lines of code: import sys, os, re sentence = raw_input("Enter a sentence: ") capwords (sentence) print sentence gives me the following error: NameError: name 'capwords' is not defined As far as I can tell from the online docs, "capwords" should be defined in the built-i