> such as tempname="\"..it says that the line is single qouted.
The others have addressed the escape issue I think. However it looks like you want the funtionality of the os.path module. For example: >>> import os.path as path >>> filename = "/home/ant/test.sh" >>> filename2 = r"c:\python24\scripts\test.py" >>> path.split(filename) ('/home/ant', 'test.sh') >>> path.split(filename2) ('c:\\python24\\scripts', 'test.py') -- http://mail.python.org/mailman/listinfo/python-list