python on Linux

John Gordon gordon at
Fri Oct 10 06:37:52 CEST 2014

In <mailman.14733.1412914913.18130.python-list at> Igor Korot <ikorot01 at> writes:

> sys.path.append('~/MyLib')

> I.e., will '~' sign be expanded correctly?

Not as written.

Use os.path.expanduser() to get user's home directories.

John Gordon         Imagine what it must be like for a real medical doctor to
gordon at    watch 'House', or a real serial killer to watch 'Dexter'.

More information about the Python-list mailing list