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


Groups > comp.lang.python > #32837

RE: Logging output to be redirected to a particular folder

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 <ramit.prasad@jpmorgan.com>
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" <ramit.prasad@jpmorgan.com>
To "python-list@python.org" <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 <bdec816f-bde8-427a-b604-30e12a773595@googlegroups.com> <k7avku$ecv$1@ger.gmane.org> <ueii98t9ivukh3v2ojc89795g94j9n68oh@invalid.netcom.com>
In-Reply-To <ueii98t9ivukh3v2ojc89795g94j9n68oh@invalid.netcom.com>
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 <python-list.python.org>
List-Unsubscribe <http://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 <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.3335.1352224715.27098.python-list@python.org> (permalink)
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

Show key headers only | View raw


Dennis Lee Bieber wrote:
> 
> On Tue, 06 Nov 2012 13:26:11 +0100, Peter Otten <__peter__@web.de>
> declaimed the following in gmane.comp.python.general:
> 
> > anuradha.raghupathy2010@gmail.com wrote:
[snip]
> > > def main():
> > >    logging.basicConfig(Filename='c://myapp.log', level=logging.ERROR)
> >
> > Python is case-sensitive. Try:
> >
> >      logging.basicConfig(filename='c://myapp.log', level=logging.ERROR)
> >
> 	The double forward slashes might also be confusing... At the least,
> unneeded...
> 
> >>> import os.path
> >>> print os.path.normpath("c://somefile.log")
> c:\somefile.log
> >>> print os.path.normpath("c:\\somefile.log")
> c:\somefile.log
> >>> print os.path.normpath("c:\\tryfile.log")
> c:\tryfile.log
> >>> print os.path.normpath("c:\tryfile.log")
> c:	ryfile.log
> >>> print os.path.normpath("c:/tryfile.log")
> c:\tryfile.log
> >>>
> 
> 	Doubling back-slashes is needed to avoid the problem of literal
> escapes corrupting the intent...

Or use the raw literal form r"c:\tryfile.log". I know several
people that prefer to use forward slashes as it works in both 
Windows and *nix.


~Ramit


This email is confidential and subject to important disclaimers and
conditions including on offers for the purchase or sale of
securities, accuracy and completeness of information, viruses,
confidentiality, legal privilege, and legal entity disclaimers,
available at http://www.jpmorgan.com/pages/disclosures/email.  

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


Thread

Logging output to be redirected to a particular folder anuradha.raghupathy2010@gmail.com - 2012-11-06 03:28 -0800
  Re: Logging output to be redirected to a particular folder Peter Otten <__peter__@web.de> - 2012-11-06 13:26 +0100
  Re: Logging output to be redirected to a particular folder Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-11-06 12:38 -0500
  RE: Logging output to be redirected to a particular folder "Prasad, Ramit" <ramit.prasad@jpmorgan.com> - 2012-11-06 17:58 +0000
    Re: Logging output to be redirected to a particular folder anuradha.raghupathy2010@gmail.com - 2012-11-06 22:39 -0800
    Re: Logging output to be redirected to a particular folder anuradha.raghupathy2010@gmail.com - 2012-11-06 22:39 -0800

csiph-web