[Q]How to append paths in a platform-independent way?

sdhyok sdhyok at yahoo.com
Wed Apr 2 05:46:36 CEST 2003


How to do the following jobs in a platform-independent way?

path = /home/sdhyok
file = data.txt

1. Append the file name to the path => /home/sdhyok/data.txt
2. Extract only path from /home/sdhyok/data.txt => /home/sdhyok

Daehyok




More information about the Python-list mailing list