[EMAIL PROTECTED]
| 
| Hello all,
| I have a username variable luser:
| 
| luser = win32api.GetUserName
| 
| I need to insert it into the following to replace the hardcoded
| "johndoe" in the pathname of GIS.GIS.Parcels:
| 
| GIS_GIS_Parcels = "Database
| [EMAIL PROTECTED]
| .GIS.Parcels"

Just in case that's real code you've posted, you
should have:

luser = win32api.GetUserName () # note the brackets

otherwise you're simply binding the function
object to the name luser and not the result of
calling it.

But as to your actual question, you want to do something
like this:

x = "[EMAIL PROTECTED]" % luser

ie use %s within a string as a placeholder for the luser
string.

TJG

________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to