Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.012 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'escape': 0.09; 'literal': 0.09; 'separately': 0.09; 'windows,': 0.09; 'cc:addr:python-list': 0.11; 'windows': 0.15; 'already,': 0.16; 'backslashes': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'igor': 0.16; 'subject:python': 0.16; 'sat,': 0.16; 'wrote:': 0.18; '>>>': 0.22; 'cc:addr:python.org': 0.22; 'string,': 0.24; 'fine': 0.24; '(or': 0.24; 'cc:2**0': 0.24; 'this:': 0.26; 'header :In-Reply-To:1': 0.27; 'am,': 0.29; 'primarily': 0.30; 'message- id:@mail.gmail.com': 0.30; 'fri,': 0.33; 'something': 0.35; 'but': 0.35; 'received:google.com': 0.35; '+0200,': 0.36; 'operating': 0.37; 'system,': 0.38; 'others.': 0.38; 'system.': 0.39; 'save': 0.62; 'kind': 0.63; 'forward': 0.65; 'yourself': 0.78; 'fragments': 0.84; 'trouble.': 0.91; 'to:none': 0.92 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=CpqFIVshZFddZRMJ77bTmEXeYS9fCUhfkkl/TwkLA8A=; b=UI7QZ2jo63zJTftI/cBeamg3Bim32EFtGYoOh47hBtDShtz7Sx4tHxiZ60VxpRcgst iNCBGJVmcdDkoitVAYNdiHFmSMCjb3rogQw1Inw5NzTpvz2zU+QIcUkNQxGc8XXENtFx kHFMyWDQRQs9SIrnTAaUicBMZTQKu4HFiwxp6gMN16mhkROaI6QoQijLRcLtRmhKzJiF nGjXnLfHov7tSPTHf1mQH4IDiMqgeuTYV8zidbj8DGjLX5DY79OAdgQ2BzPVK8ZJdahe os7VoLGyir+PVYAYyjB5rveY9W50UILGXI6oaQD/9+xORKYlcgZIxO+g/Oekk58KnIzC WClg== MIME-Version: 1.0 X-Received: by 10.42.92.129 with SMTP id t1mr16744369icm.59.1412956398978; Fri, 10 Oct 2014 08:53:18 -0700 (PDT) In-Reply-To: References: <54377d29$0$2833$e4fe514c@news.xs4all.nl> Date: Sat, 11 Oct 2014 02:53:18 +1100 Subject: Re: python on Linux From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 22 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1412956402 news.xs4all.nl 2835 [2001:888:2000:d::a6]:37374 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:78957 On Sat, Oct 11, 2014 at 2:44 AM, Peter Pearson wrote: > On Fri, 10 Oct 2014 08:31:04 +0200, Irmen de Jong wrote: >> On 10-10-2014 6:21, Igor Korot wrote: > >>> When I am on Windows, I can write something like this: >>> >>> sys.path.append('C:\Users\Igor\Documents\MyLib') >> >> While this might work on your system, it may not work on others. >> >> - you need to escape the backslashes (or just use forward slashes, >> they work on windows too) > > And remember that os.path.join() will join path fragments with > the right kind of slashes for your operating system. That's fine if you have the parts separately already, but when it's primarily a single literal string, just use slashes and save yourself the trouble. ChrisA