En Thu, 24 Jul 2008 12:02:00 -0300, Lanny <[EMAIL PROTECTED]> escribió:

> I've used glob.glob to get a list of files in a directory
> and now I want to use os.system to execute one of
> those files, the problem is that python automatically
> puts a escape charater infront of the back slashes
> so the os.system gets X:\\####\\####\\ and is useless,
> I think I need to convert my string to a raw string but
> I don't know how.

Those \\ represent a SINGLE character. That is, they LOOK duplicated in code 
and when you use repr(...) but it's actually a single backslash:

>>> path = "X:\\abc"
>>> path
'X:\\abc'
>>> print path
X:\abc
>>> len(path)
6

Probably you have another issue - please post a short but complete failing 
code...

-- 
Gabriel Genellina

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

Reply via email to