Sorry guys.  It has been a long day today.  There is no issues when dealing
with "#" in variables.  I found out that when I was reading the file, there
were additional blank spaces being appended to the value.

To correct the issue, I just had to dp
   varName = msInfo[0].strip()
   finName = varName.strip()


On 2/27/07, Sick Monkey <[EMAIL PROTECTED]> wrote:

I have a quick question about handling values with special characters.

Lets say I have a file which contains:
==================================
   blah#blah
==================================
Here is what I have for my code:
   f6 = open(fileAttached)
   msInfo = f6.readlines(); f6.close()
   varName = msInfo[0]
   ....
   smtp.login(uname,varName)
   ...
==================================
I am trying to connect to a mailserver, and it keeps failing.  My guess is
that the "#" sign messing up.  Is there anyway to encode that character?



-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to