Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #78957

Re: python on Linux

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 <rosuav@gmail.com>
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 <c9qd6oFqn3eU1@mid.individual.net>
References <mailman.14733.1412914913.18130.python-list@python.org> <54377d29$0$2833$e4fe514c@news.xs4all.nl> <c9qd6oFqn3eU1@mid.individual.net>
Date Sat, 11 Oct 2014 02:53:18 +1100
Subject Re: python on Linux
From Chris Angelico <rosuav@gmail.com>
Cc "python-list@python.org" <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 <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.14756.1412956402.18130.python-list@python.org> (permalink)
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

Show key headers only | View raw


On Sat, Oct 11, 2014 at 2:44 AM, Peter Pearson
<pkpearson@nowhere.invalid> 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

Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

python on Linux Igor Korot <ikorot01@gmail.com> - 2014-10-09 21:21 -0700
  Re: python on Linux John Gordon <gordon@panix.com> - 2014-10-10 04:37 +0000
  Re: python on Linux Irmen de Jong <irmen.NOSPAM@xs4all.nl> - 2014-10-10 08:31 +0200
    Re: python on Linux Chris Angelico <rosuav@gmail.com> - 2014-10-10 17:58 +1100
      Re: python on Linux Irmen de Jong <irmen.NOSPAM@xs4all.nl> - 2014-10-10 09:48 +0200
    Re: python on Linux Peter Pearson <pkpearson@nowhere.invalid> - 2014-10-10 15:44 +0000
      Re: python on Linux Chris Angelico <rosuav@gmail.com> - 2014-10-11 02:53 +1100
    Re: python on Linux Ian Kelly <ian.g.kelly@gmail.com> - 2014-10-10 09:52 -0600

csiph-web