gmax2006 wrote: > I am developing scripts that must run on both Linux and windows. > > My scripts contain lots of relative paths (such as log\\log.txt or > ctl\\table.ctl) If I use os.sep, it makes the code ugly. Is there any > tips or techniques to have Python automatically converts \\ to / when > the script runs on Linux? What is the best way to deal with this > situation?
forward slashes work just fine on Windows too, in almost all cases. (for the few cases when they don't work, use os.path.normpath and friends to fix them up). </F> -- http://mail.python.org/mailman/listinfo/python-list