Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Logging output to be redirected to a particular folder

Received: by 10.66.79.233 with SMTP id m9mr1254513pax.37.1352270346037;
        Tue, 06 Nov 2012 22:39:06 -0800 (PST)
Received: by 10.68.131.8 with SMTP id oi8mr1128467pbb.15.1352270346016; Tue,
 06 Nov 2012 22:39:06 -0800 (PST)
Path: 6ni63996pbd.1!nntp.google.com!kr7no34890047pbb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups: comp.lang.python
Date: Tue, 6 Nov 2012 22:39:05 -0800 (PST)
In-Reply-To: <mailman.3335.1352224715.27098.python-list@python.org>
Complaints-To: groups-abuse@google.com
Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=59.144.10.250;
 posting-account=qyY2bQoAAAB2bpvKSd55uLND4g16sXKM
NNTP-Posting-Host: 59.144.10.250
References: <bdec816f-bde8-427a-b604-30e12a773595@googlegroups.com>
 <k7avku$ecv$1@ger.gmane.org> <ueii98t9ivukh3v2ojc89795g94j9n68oh@invalid.netcom.com>
 <mailman.3335.1352224715.27098.python-list@python.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <58708428-cea7-4ff7-8665-c31c7e6dac3d@googlegroups.com>
Subject: Re: Logging output to be redirected to a particular folder
From: anuradha.raghupathy2...@gmail.com
Cc: "python-l...@python.org" <python-l...@python.org>
Injection-Date: Wed, 07 Nov 2012 06:39:06 +0000
Content-Type: text/plain; charset=ISO-8859-1

Thanks ...this works perfectly fine now.

On Tuesday, November 6, 2012 11:28:46 PM UTC+5:30, Prasad, Ramit wrote:
> Dennis Lee Bieber wrote:
> 
> > 
> 
> > On Tue, 06 Nov 2012 13:26:11 +0100, Peter Otten <__pete...@web.de>
> 
> > declaimed the following in gmane.comp.python.general:
> 
> > 
> 
> > > anuradha.raghupathy2...@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.