~Python ?

Gerson Kurz gerson.kurz at t-online.de
Tue Dec 26 07:03:40 CET 2000

On Linux, ~ usually refers to the users homedir, but not so in Python
(at least, in ActivePython 2.0). I found out the hard way when using a
script that issued os.makedirs() relative to ~ - It created an actual
directory named ~. You can have real fun if you try to deleting an
actual directory named ~ on Linux, boy. 

I understand that ~ is probably handled by the shell, but if Python
doesn't deal with it, its hard to use Python in some kinds of scripts.
(I think Perl, Pythons ugly twin-brother, does)

More information about the Python-list mailing list