question about modules

Reinhold Birkenfeld reinhold-birkenfeld-nospam at wolke7.net
Fri Dec 10 21:10:32 CET 2004


Jon wrote:
> Hi Jeff,
> 
> That makes sense -- thanks.  However now when I use "re.capwords (sentence)"
> I get a different error message:
> 
> AttributeError: 'module' object has no attribute 'capwords'
> 
> Each of the other two suggested implimentations produce a similar error
> message.  Is there something even more basic that I am failing to do?  I'm
> using the IDLE GUI in WinXP, Python release 2.4...

The 'capwords' function seems to be defined in the "string" module, not
the "re" module.

Reinhold

-- 
[Windows ist wie] die Bahn: Man muss sich um nichts kuemmern, zahlt fuer
jede Kleinigkeit einen Aufpreis, der Service ist mies, Fremde koennen
jederzeit einsteigen, es ist unflexibel und zu allen anderen Verkehrs-
mitteln inkompatibel.               -- Florian Diesch in dcoulm



More information about the Python-list mailing list