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

sdhyok sdhyok at yahoo.com
Tue Apr 1 22:46:36 EST 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