[Tutor] How to replace the '\'s in a path with '/'s?

Sergey sergey at mighty.co.za
Sun Jul 31 17:59:33 CEST 2011


Gotcha!
http://pymon.googlecode.com/svn/tags/pymon-0.2/Internet/rsync.py
231-239 strings

## code ##

def convertPath(path):
	# Convert windows, mac path to unix version.
	separator = os.path.normpath("/")
	if separator != "/":
		path = re.sub(re.escape(separator), "/", path)

	# Help file, folder pattern to express that it should match the all file or
folder name.
	path = "/" + path
	return path

## code ##

>On Sat, 30 Jul 2011 22:28:11 -0700 "Richard D. Moores" <rdmoores at gmail.com>
wrote


____________________________________________________________
South Africas premier free email service - www.webmail.co.za 

Save on insurance with OUTsurance
https://www.outsurance.co.za/insurance-quote/?source=webmailmailer&cr=facp11_468x60&cid=221




More information about the Tutor mailing list