How to convert backward slash command in python to run on Linux -


i error on line when run code in linux:

dst_file_path = "%s\%s" % (dst,loc[1])    

how can using module. in advance.

os.path.join automatically include correct directory separator based on platform being used.

import os  dst_file_path = os.path.join(dst, loc[1]) 

Comments

Popular posts from this blog

mod rewrite - Using "?" when rewriting the URL -

.htaccess: Transfer name to index.php if not directory public -

Admob integration with pygame in android -