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


Groups > comp.lang.python > #78928

Re: python on Linux

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!bcyclone04.am1.xlned.com!bcyclone04.am1.xlned.com!feeder1.cambriumusenet.nl!feed.tweaknews.nl!194.109.133.86.MISMATCH!newsfeed.xs4all.nl!newsfeed3a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!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; 'windows,': 0.09; 'cc:addr:python-list': 0.11; 'windows': 0.15; 'backslashes': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'igor': 0.16; 'subject:python': 0.16; 'wrote:': 0.18; 'all,': 0.19; 'cc:addr:python.org': 0.22; 'skip:% 10': 0.24; 'versions': 0.24; '(or': 0.24; 'cc:2**0': 0.24; 'this:': 0.26; 'header:In- Reply-To:1': 0.27; 'correct': 0.29; 'message-id:@mail.gmail.com': 0.30; 'fri,': 0.33; 'something': 0.35; 'received:google.com': 0.35; 'hi,': 0.36; 'skip:o 20': 0.38; 'system,': 0.38; 'others.': 0.38; 'pm,': 0.38; "you'll": 0.62; 'forward': 0.65; '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=xE/uJsBpLOfh+SFidQluDu9HZaJok9VbEGMV76xyLy0=; b=iOmu4nN4ZR4fmBeEkP7ll81zpwjl9HAGqARsfsJmgJspSNJjBOLpm8D/hHzjElvUvV i2IYOXp83NxKCzCGz3twhIwZI/vQTpVK+rD8NIUA2hkG5D9N96OxLWyAEWGYbPGGgzt7 ZZFneKWpcyIHJWetRi8nEwuzM8I/I/cThorFoXR7k4QWOuh5y10vG3iQnZh/ML/2I2eR 6zq9/NaBIcPINjEE0C17BWa3FbPaO3J2H99XzACqS5Cw62frad78VGyN46imPD2QF8IT r/CBi66yWc014njUysdG3CYrC+uzQi4lk7efFtgm/nFFTh0jYPYMKMrlmRPQfIPT80jJ foCA==
MIME-Version 1.0
X-Received by 10.50.20.169 with SMTP id o9mr3960147ige.14.1412924287849; Thu, 09 Oct 2014 23:58:07 -0700 (PDT)
In-Reply-To <54377d29$0$2833$e4fe514c@news.xs4all.nl>
References <mailman.14733.1412914913.18130.python-list@python.org> <54377d29$0$2833$e4fe514c@news.xs4all.nl>
Date Fri, 10 Oct 2014 17:58:07 +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.14741.1412924297.18130.python-list@python.org> (permalink)
Lines 18
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1412924297 news.xs4all.nl 2893 [2001:888:2000:d::a6]:49002
X-Complaints-To abuse@xs4all.nl
X-Received-Bytes 3763
X-Received-Body-CRC 1020149788
Xref csiph.com comp.lang.python:78928

Show key headers only | View raw


On Fri, Oct 10, 2014 at 5:31 PM, Irmen de Jong <irmen.NOSPAM@xs4all.nl> wrote:
> On 10-10-2014 6:21, Igor Korot wrote:
>> Hi, ALL,
>> 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)
> - not all windows installations and versions have their user folders in
> C:\Users\<username>. On windows too, you'll have to use something like %USERPROFILE% to
> get to the correct directory if you want it to work correctly in all cases.

AIUI you can use os.path.expanduser() on Windows as well, and it'll
take care of USERPROFILE.

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