Path: csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed5.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.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'completeness': 0.07; 'try:': 0.07; 'python': 0.09; 'literal': 0.09; 'os.path': 0.09; 'received:155': 0.09; 'def': 0.10; 'disclaimers': 0.16; 'disclaimers,': 0.16; 'escapes': 0.16; 'from:addr:jpmorgan.com': 0.16; 'least,': 0.16; 'main():': 0.16; 'received:155.180': 0.16; 'received:159.53': 0.16; 'received:exchad.jpmchase.net': 0.16; 'received:jpmchase.com': 0.16; 'received:jpmchase.net': 0.16; 'securities,': 0.16; 'slashes': 0.16; 'subject:Logging': 0.16; 'subject:folder': 0.16; 'url:disclosures': 0.16; 'url:jpmorgan': 0.16; 'wrote:': 0.17; '>>>': 0.18; 'windows': 0.19; 'to:name :python-list@python.org': 0.20; 'import': 0.21; 'received:169.254': 0.24; 'header:In-Reply-To:1': 0.25; 'raw': 0.27; 'accuracy': 0.27; '+0100,': 0.29; 'received:169': 0.29; 'print': 0.32; 'skip:l 40': 0.33; 'problem': 0.33; 'to:addr :python-list': 0.33; 'needed': 0.35; 'nov': 0.35; 'charset:us- ascii': 0.36; 'subject:: ': 0.38; 'skip:l 20': 0.38; 'several': 0.39; 'to:addr:python.org': 0.39; 'email addr:gmail.com': 0.63; 'information,': 0.63; 'url:email': 0.63; 'legal': 0.65; 'subject': 0.66; 'forward': 0.66; 'purchase': 0.67; 'sale': 0.76; 'otten': 0.84; 'received:169.254.8': 0.84; 'dennis': 0.91; 'doubling': 0.91 X-DKIM: OpenDKIM Filter v2.1.3 sz4.jpmchase.com qA6HwUdY025294 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jpmorgan.com; s=smtpout; t=1352224710; bh=7zu0xaG6ytw7H/XXwmonYY1DqXLfC+UPPUh+mZuRhrU=; h=From:To:Subject:Date:Message-ID:References:In-Reply-To: Content-Transfer-Encoding:MIME-Version:Content-Type; b=Forr4inLEcc7kjqmFlj8XS+mRV0GZ6MPCUhR2wZ2U0E30Koy8UcWzim8dex/YhlQF YRufZ5Ep+fjSwq5doTUQ8ikHKa8sOlDZ5mlL8w1LiJlIeYMAUCiS+kuLe0WCKDeFbK HF6AXOaYChhzm4IAr+Dkzb/fYQj5vHWyusmnDwys= From: "Prasad, Ramit" To: "python-list@python.org" Subject: RE: Logging output to be redirected to a particular folder Thread-Topic: Logging output to be redirected to a particular folder Thread-Index: AQHNvEWSHwoyXcAfEEGl8JXhEJRVSZfdFxMg Date: Tue, 6 Nov 2012 17:58:21 +0000 References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.67.79.47] Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-DLP-FWD: Yes Content-Type: text/plain; charset="us-ascii" 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: 24 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1352224715 news.xs4all.nl 6930 [2001:888:2000:d::a6]:47316 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:32837 Dennis Lee Bieber wrote:=0D=0A> =0D=0A> On Tue, 06 Nov 2012 13:26:11 +0100,= Peter Otten <__peter__@web=2Ede>=0D=0A> declaimed the following in gmane= =2Ecomp=2Epython=2Egeneral:=0D=0A> =0D=0A> > anuradha=2Eraghupathy2010@gmai= l=2Ecom wrote:=0D=0A[snip]=0D=0A> > > def main():=0D=0A> > > logging=2Eb= asicConfig(Filename=3D'c://myapp=2Elog', level=3Dlogging=2EERROR)=0D=0A> >= =0D=0A> > Python is case-sensitive=2E Try:=0D=0A> >=0D=0A> > logging= =2EbasicConfig(filename=3D'c://myapp=2Elog', level=3Dlogging=2EERROR)=0D=0A= > >=0D=0A> The double forward slashes might also be confusing=2E=2E=2E At = the least,=0D=0A> unneeded=2E=2E=2E=0D=0A> =0D=0A> >>> import os=2Epath=0D= =0A> >>> print os=2Epath=2Enormpath("c://somefile=2Elog")=0D=0A> c:\somefil= e=2Elog=0D=0A> >>> print os=2Epath=2Enormpath("c:\\somefile=2Elog")=0D=0A> = c:\somefile=2Elog=0D=0A> >>> print os=2Epath=2Enormpath("c:\\tryfile=2Elog"= )=0D=0A> c:\tryfile=2Elog=0D=0A> >>> print os=2Epath=2Enormpath("c:\tryfile= =2Elog")=0D=0A> c: ryfile=2Elog=0D=0A> >>> print os=2Epath=2Enormpath("c:/t= ryfile=2Elog")=0D=0A> c:\tryfile=2Elog=0D=0A> >>>=0D=0A> =0D=0A> Doubling = back-slashes is needed to avoid the problem of literal=0D=0A> escapes corru= pting the intent=2E=2E=2E=0D=0A=0D=0AOr use the raw literal form r"c:\tryfi= le=2Elog"=2E I know several=0D=0Apeople that prefer to use forward slashes = as it works in both =0D=0AWindows and *nix=2E=0D=0A=0D=0A=0D=0A~Ramit=0D=0A= =0D=0A=0D=0AThis email is confidential and subject to important disclaimers= and=0D=0Aconditions including on offers for the purchase or sale of=0D=0As= ecurities, accuracy and completeness of information, viruses,=0D=0Aconfiden= tiality, legal privilege, and legal entity disclaimers,=0D=0Aavailable at h= ttp://www=2Ejpmorgan=2Ecom/pages/disclosures/email=2E