python on Linux

Dan Stromberg drsalists at gmail.com
Fri Oct 10 00:38:55 EDT 2014


Try:

sys.path.append(os.path.expanduser('~/MyLib'))

On Thu, Oct 9, 2014 at 9:21 PM, Igor Korot <ikorot01 at gmail.com> wrote:
> Hi, ALL,
> When I am on Windows, I can write something like this:
>
> sys.path.append('C:\Users\Igor\Documents\MyLib')
>
> Now, when I'm on Linux, can I do this:
>
> sys.path.append('~/MyLib')
>
> ?
>
> I.e., will '~' sign be expanded correctly?
>
> Thank you.
> --
> https://mail.python.org/mailman/listinfo/python-list



More information about the Python-list mailing list