[Newby] question about modules

Jon jon.f.crawford at gmail.com
Fri Dec 10 19:29:23 CET 2004


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-in "regex" module.  Why is it telling me that capwords is not
defined?

I am completely new to Python so my apologies for such a basic question!

Thanks,
Jon





More information about the Python-list mailing list