How to make xss safe strings

2008-08-20 Thread Roopesh
Hi, How can I make a string XSS safe? Will simply .replace('<','<').replace('>','>') do the work? Or are there some other issues to take into account?. Is there already a function in python which will do this for me. Regards Roopesh -- http://mail.python.org/mailman/listinfo/python-list

Re: Problems with file IO in a thread, and shutil

2008-06-27 Thread Roopesh
> Maybe it's a Windows service, eg the indexing service or generating > thumbnails. Anyway, retrying after a delay would still be worth it. Yes, this thing works :-) Thanks a lot. Thanks Roopesh -- http://mail.python.org/mailman/listinfo/python-list

Re: poplib - retr() getting stuck

2008-06-26 Thread Roopesh
connect(sa) except socket.error, msg: Thanks Roopesh -- http://mail.python.org/mailman/listinfo/python-list

Re: Problems with file IO in a thread, and shutil

2008-06-26 Thread Roopesh
? Thanks Roopesh -- http://mail.python.org/mailman/listinfo/python-list

Re: recursion in Class-methods?

2008-06-25 Thread Roopesh
(self.dictionary, node, end, path) newpath = self.find_shortest_path(self.dictionary, node, end, path) Regards Roopesh -- http://mail.python.org/mailman/listinfo/python-list

Problems with file IO in a thread, and shutil

2008-06-25 Thread Roopesh
rocess'). I looked inside the shutil.move. What I found was due to this WindowsError, the usual os.rename() inside shutil.move() fails and the file is copied using copy2(src, dst). Finally os.unlink() also failed. (So though copying occurred, deleting the source file failed) I am not getting w

POP3_SSL Error

2008-06-22 Thread Roopesh
Hi, While using poplib to fetch mails from my gmail account, I am getting the following error: Exception is POP3_SSL instance has no attribute 'sslobj' Can anyone tell me what this error means. Thanks and Regards Roopesh -- http://mail.python.org/mailman/listinfo/python-list

poplib - retr() getting stuck

2008-06-20 Thread Roopesh
ions but simply stops. My code is roughly like the foll: try: print "1" mymsg = M.retr(msg_no) print "2" except poplib.error_proto, e: print "exception1" except Exception, e: print "exception2" What can be the reason for this? Can anyone he

ConfigObj quoting issues

2008-06-02 Thread Roopesh
'').replace('\"','').replace('\n','') [making list_all=False doesn't work properly(it fails when the first character is a double quote). ] I don't want to do the above, as it modifies the email address (name). In brief, my question is h

Bug in email.utils, parseaddr

2008-05-08 Thread Roopesh
Hi, I tried using parseaddr of email.utils, but it gave the following result when the name had a comma inside. >>> e = 'K,Vishal <[EMAIL PROTECTED]>' >>> from email.utils import parseaddr >>> parseaddr(e) ('', 'K') Thanks and Reg

Mod python - mysql lock

2007-03-05 Thread Roopesh
t; command of mysql through python code, but it is not locking the database. Any ideas why this isn't working and how can I do the same. //python code sql = "LOCK TABLES card WRITE" cursor.execute(sql) Regards Roopesh -- http://mail.python.org/mailman/listinfo/python-list

cPickle EOF Error

2007-02-28 Thread Roopesh
llows : def import_cards(): try : conn = MySQLdb.connect(host="localhost",port=3306,user="roopesh",passwd="pass",db="mydbs") cursor = conn.cursor() cursor.execute("CREATE TABLE card (serial_no in

IMAP SEARCH Error

2007-01-17 Thread Roopesh
I am using the imaplib to fetch mails. There is an error thrown in the search function, which I am not able to comprehend. My program is as follows : import imaplib M = imaplib.IMAP4("10.1.1.1",1143) M.login("roopesh", "roopesh12") type, data

sslerror: (8, 'EOF occurred in violation of protocol')

2007-01-16 Thread Roopesh
, o = self._getline() File "c:\python24\lib\poplib.py", line 374, in _getline self._fillBuffer() File "c:\python24\lib\poplib.py", line 364, in _fillBuffer localbuf = self.sslobj.read() sslerror: (8, 'EOF occurred in violation of protocol') Regards Roopesh -- http://mail.python.org/mailman/listinfo/python-list

RotatingFileHandler Error

2006-12-28 Thread Roopesh
uncs func(*targs, **kargs) File "c:\python24\lib\logging\__init__.py", line 1351, in shutdown h.flush() File "c:\python24\lib\logging\__init__.py", line 731, in flush self.stream.flush() ValueError: I/O operation on closed file Can anyone tell me, w hat is wrong with my code. Roopesh -- http://mail.python.org/mailman/listinfo/python-list