What's wrong with me/Python ?

Jere Kahanpaa jkahanpa at pcu.helsinki.fi.invalid
Tue Mar 13 06:48:51 EST 2001


Alexander Stirzel <alexander.stirzel at daimlerchrysler.com> wrote:
: 8<----------- error message -----------------------------
: Traceback (most recent call last):
:   File "/usr/sbin/netscape-killer.py", line 11, in ?
:     splitted = string.split(line)
: NameError: There is no variable named 'string'
: 8<----------- error message -----------------------------

: Now here's the script:

: 8<------------ script -----------------------------------
: #!/usr/local/bin/python
: import os
: import time

Add 'import string'. The 'string' module is not automatically loaded. You 
can also import several modules on a single line:

import os, time, string 

Happy Hacking
	Jere
-- 
Lord, make my words as sweet as honey, for one day I may have to eat them
								
							Daryl Benson



More information about the Python-list mailing list