bloody freshman question regarding strings

Christian Guenther chris at blaue-elise.net
Sun Jun 23 04:35:51 EDT 2002


Hi folks,

I'm absolutely new to python - also I'm not a beginner in programming.
I bought myself a book called "Einführung in python" - should be
"introduction to python" in the original - by Markus Lutz and David
Asher published by O'Reilly. This book is good, nevertheless I'm a bit
in a hurry because I have to write a script that is supposed to populate
an LDAP-directory for user-authentication. 
By the way: Is there a module for python -> ldap? 

My biggest question at the moment is why can't I do something like this:

def mailmsg(severity message opts target recipient):
	# first create the message body
	msgbody="computer: " + COMPUTER + "\n
	         system:   " + SYSTEMTYPE + "\n
		 cpu:      " + CPUTYPE + "\n
		 kernel:   " + KERNELVER + "\n
		 date:     " + DATE + "\n
		 \n
		 severity: " + severity + "\n
		 message:  " + message + "\n\n"


I want to generate messages - to concole and to mail-recipients - that
show the status of user-processing. This message should include all the
information you see above - they are stored in global vars - a severity
and of course a message itself. Let alone, it just doesn't work and I
know I do this in a nodo way, I just don't have alot of time left ;-)

Could someone point me to the right direction????

	chris


-- 
 __    __  __     __  __ ___    ___                      
|  |  |  ||  \   |  ||  |\  \  /  /              chris Guenther
|  |  |  ||   \  |  ||  | \  \/  /               chris at blaue-elise.net
|  |  |  ||  . \ |  ||  |  >    <                Wuppertal / Germany
|  |__|  ||  |\ \|  ||  | /  /\  \  
 \______/ |__| \____||__|/__/  \__\ 

UNIX _IS_ user friendly, it's just selective about who its friends are
  
----------------------------------------------------------------------
  UNIX was not designed to stop you from doing stupid things, 
  because that would also stop you from doing clever things.
                                                         ...Doug Gwyn
----------------------------------------------------------------------






More information about the Python-list mailing list