Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!cs.uu.nl!news.stack.nl!newsfeed.xs4all.nl!newsfeed6.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.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'escape': 0.04; '(python,': 0.07; 'python': 0.08; 'nameerror:': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:80.91.229.12': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'received:lo.gmane.org': 0.09; 'win32': 0.12; '"copyright",': 0.16; '"credits"': 0.16; '2.7.2': 0.16; 'bieber': 0.16; 'declaimed': 0.16; 'email addr:ix.netcom.com': 0.16; 'email name:wlfraed': 0.16; 'from:addr:ix.netcom.com': 0.16; 'from:addr:wlfraed': 0.16; 'from:name:dennis lee bieber': 0.16; 'placeholder': 0.16; 'received:66.245': 0.16; 'received:dsl.mindspring.com': 0.16; 'received:mindspring.com': 0.16; 'received:wlfraed': 0.16; 'subject:server': 0.16; 'syntaxerror:': 0.16; 'url:netcom': 0.16; 'url:wlfraed': 0.16; 'wulfraed': 0.16; '>>>': 0.18; 'defined': 0.19; '(most': 0.21; 'trying': 0.21; 'options.': 0.21; 'url:home': 0.21; "doesn't": 0.22; 'tue,': 0.23; 'sep': 0.23; 'command': 0.24; 'traceback': 0.24; 'string': 0.26; 'windows': 0.26; 'lee': 0.28; 'bit': 0.28; 'import': 0.28; '(and': 0.29; '+0200,': 0.30; 'to:addr:python- list': 0.33; 'however,': 0.34; 'last):': 0.34; 'skip:- 40': 0.35; 'header:X-Complaints-To:1': 0.35; 'uses': 0.35; 'supposed': 0.35; 'charset:us-ascii': 0.36; 'file': 0.36; 'put': 0.37; 'received:org': 0.38; 'skip:o 20': 0.38; 'subject:: ': 0.39; 'header:Mime-Version:1': 0.39; 'to:addr:python.org': 0.39; 'more': 0.60; 'exact': 0.68; 'care': 0.71; 'dennis': 0.77 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Dennis Lee Bieber Subject: Re: Installing WebDAV server Date: Tue, 06 Sep 2011 10:05:23 -0700 Organization: > Bestiaria Support Staff < References: <9c9578F5eaU2@mid.individual.net> <9cbvupFjr3U3@mid.individual.net> <86b084e0-09a8-4997-9e0c-4526d7851e1d@s2g2000vby.googlegroups.com> <9ccoqkF5efU1@mid.individual.net> <9ck5upFlpnU1@mid.individual.net> <9cmq1vFk6fU1@mid.individual.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: user-11faaio.dsl.mindspring.com X-Newsreader: Forte Agent 3.3/32.846 X-No-Archive: YES X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 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: 56 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1315328739 news.xs4all.nl 2412 [2001:888:2000:d::a6]:46782 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:12845 On Tue, 6 Sep 2011 16:46:17 +0200, "Fokke Nauta" declaimed the following in gmane.comp.python.general: > ------------------------------------------- > Python 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)] on > win32 > Type "copyright", "credits" or "license()" for more information. > >>> import os.path > >>> os.path.isdir(path_name) > > Traceback (most recent call last): > File "", line 1, in > os.path.isdir(path_name) > NameError: name 'path_name' is not defined > >>> > ------------------------------------------- > "path_name" is a placeholder -- you're supposed to put in the exact string(s) you have been trying in the configuration file (wrap the string in quotes). >>> import os.path >>> os.path.isdir("e:\webdav") False >>> os.mkdir("e:\webdav") >>> os.path.isdir("e:\webdav") True >>> os.path.isdir("e:\webdav\\") Traceback ( File "", line 1 os.path.isdir("e:\webdav\") ^ SyntaxError: EOL while scanning single-quoted string >>> os.path.isdir("e:\webdav\\") True >>> os.path.isdir("e:\webdav/") True >>> os.path.isdir("e:/webdav/") True >>> os.path.isdir("e:/webdav") True >>> os.rmdir("e:/webdav") >>> os.path.isdir("e:\webdav") False >>> Note that Python itself (and the C-runtime) doesn't care if the separator is \ or / or even mixed; it is just the Windows command line that uses \ for separator and / for options. (Python, however, uses \ as an escape and \" is treated first, hence the need for \\" to escape the \ itself) -- Wulfraed Dennis Lee Bieber AF6VN wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/