Re: Log File

2023-05-31 Thread Peter J. Holzer
On 2023-05-31 00:22:11 -0700, ahsan iqbal wrote: > Why we need a log file ? A log file contains information about what your program was doing. You use it to check that your program was performing as intended after the fact. This is especially useful for tracking down problems with programs wh

Re: Log File

2023-05-31 Thread Tobiah
On 5/31/23 00:22, ahsan iqbal wrote: Why we need a log file ? If i read a large text file than how log file help me in this regard? If you were parsing each line of this text file looking for information, perhaps some of the lines would not be formatted correctly, and you would be unable to

Log File

2023-05-31 Thread ahsan iqbal
Why we need a log file ? If i read a large text file than how log file help me in this regard? -- https://mail.python.org/mailman/listinfo/python-list

Re: Is there a log file that tracks every statement that is being executed when a program is running?

2020-10-25 Thread Mladen Gogala via Python-list
On Sun, 25 Oct 2020 12:14:52 +0100, Maxime S wrote: > Hi, > > You can use the trace module for that: > https://docs.python.org/3.8/library/trace.html > > Personally I tend to put print statement at strategic places instead, I > find that easier to analyse than a full trace but YMMV. > > Maxime

RE: Is there a log file that tracks every statement that is being executed when a program is running?

2020-10-25 Thread Steve
. FootNote: If money does not grow on trees, then why do banks have branches? From: Maxime S Sent: Sunday, October 25, 2020 7:15 AM To: Steve Cc: Python Subject: Re: Is there a log file that tracks every statement that is being executed when a program is running? Hi, You can use

Re: Is there a log file that tracks every statement that is being executed when a program is running?

2020-10-25 Thread Maxime S
Hi, You can use the trace module for that: https://docs.python.org/3.8/library/trace.html Personally I tend to put print statement at strategic places instead, I find that easier to analyse than a full trace but YMMV. Maxime Le dim. 25 oct. 2020 à 01:25, Steve a écrit : > This would seriousl

Re: Is there a log file that tracks every statement that is being executed when a program is running?

2020-10-24 Thread MRAB
On 2020-10-25 00:21, Steve wrote: This would seriously help troubleshooting for me. I updated a data file and now my main program is choking on it. When the program encounters an error, it dumps a bit of information to the screen for a few steps before the error but that is not enough. You cou

Is there a log file that tracks every statement that is being executed when a program is running?

2020-10-24 Thread Steve
This would seriously help troubleshooting for me. I updated a data file and now my main program is choking on it. When the program encounters an error, it dumps a bit of information to the screen for a few steps before the error but that is not enough. Footnote: English sprakers on a roller c

Re: log file

2019-03-24 Thread Sharan Basappa
22 03:25, Sharan Basappa wrote: > > >> > I am running a program and even though the program runs all fine, the > > >> > log file is missing. I have pasted first few lines of the code. > > >> > Any suggestions where I maybe going wrong? > > [...] > &

Re: log file

2019-03-24 Thread Luuk
On 24-3-2019 09:50, Sharan Basappa wrote: Ah. I finally solved the issue though I don't know what the problem itself it. The problem, shown with a simple example Python 3.7.2 (tags/v3.7.2:9a3ffc0492, Dec 23 2018, 22:20:52) [MSC v.1916 32 bit (Intel)] on win32 Type "help", "copyright", "cr

Re: log file

2019-03-24 Thread Sharan Basappa
the program runs all fine, the > >> > log file is missing. I have pasted first few lines of the code. > >> > Any suggestions where I maybe going wrong? > [...] > >> > #Create and configure logger > >> > logging.basicConfig(filename="test_1.

Re: log file

2019-03-23 Thread Cameron Simpson
On 23Mar2019 21:47, Sharan Basappa wrote: On Friday, 22 March 2019 09:13:18 UTC+5:30, MRAB wrote: On 2019-03-22 03:25, Sharan Basappa wrote: > I am running a program and even though the program runs all fine, the log file is missing. I have pasted first few lines of the code. &g

Re: log file

2019-03-23 Thread Sharan Basappa
On Friday, 22 March 2019 09:13:18 UTC+5:30, MRAB wrote: > On 2019-03-22 03:25, Sharan Basappa wrote: > > I am running a program and even though the program runs all fine, the log > > file is missing. I have pasted first few lines of the code. > > > > Any suggestion

Re: log file

2019-03-23 Thread Sharan Basappa
On Friday, 22 March 2019 09:09:16 UTC+5:30, adam@gmail.com wrote: > On Thursday, March 21, 2019 at 10:26:14 PM UTC-5, Sharan Basappa wrote: > > I am running a program and even though the program runs all fine, the log > > file is missing. I have pasted first few lines of the

Re: log file

2019-03-23 Thread Sharan Basappa
On Friday, 22 March 2019 09:09:14 UTC+5:30, DL Neil wrote: > On 22/03/19 4:25 PM, Sharan Basappa wrote: > > I am running a program and even though the program runs all fine, the log > > file is missing. I have pasted first few lines of the code. > > > > Any suggestion

Re: log file

2019-03-21 Thread MRAB
On 2019-03-22 03:25, Sharan Basappa wrote: I am running a program and even though the program runs all fine, the log file is missing. I have pasted first few lines of the code. Any suggestions where I maybe going wrong? import os import csv import logging import assertion_design as asd import

Re: log file

2019-03-21 Thread adam . preble
On Thursday, March 21, 2019 at 10:26:14 PM UTC-5, Sharan Basappa wrote: > I am running a program and even though the program runs all fine, the log > file is missing. I have pasted first few lines of the code. > I am thinking--hoping, rather--that you just kind of double pasted there.

Re: log file

2019-03-21 Thread DL Neil
On 22/03/19 4:25 PM, Sharan Basappa wrote: I am running a program and even though the program runs all fine, the log file is missing. I have pasted first few lines of the code. Any suggestions where I maybe going wrong? import os import csv import logging import assertion_design as asd import

log file

2019-03-21 Thread Sharan Basappa
I am running a program and even though the program runs all fine, the log file is missing. I have pasted first few lines of the code. Any suggestions where I maybe going wrong? import os import csv import logging import assertion_design as asd import random #Create and configure logger

Re: In ports of a log file, how to detect if the ports are dangerous using python?

2017-09-07 Thread Chris Angelico
On Thu, Sep 7, 2017 at 11:28 PM, Rockzers wrote: > I know basic python and I have a log file, also I have print the output of > ports from the log file which there are so many ports in the output. > I want to know how to take only the dangerous ports from the printed ports - > Al

In ports of a log file, how to detect if the ports are dangerous using python?

2017-09-07 Thread Rockzers
I know basic python and I have a log file, also I have print the output of ports from the log file which there are so many ports in the output. I want to know how to take only the dangerous ports from the printed ports - Also I need to take the IP addresses from the dangerous ports - Finally how

Re: log file.

2016-06-15 Thread Paul Rudin
Joaquin Alzola writes: > This email is confidential and may be subject to privilege. If you are > not the intended recipient, please do not copy or disclose its content > but contact the sender immediately upon receipt. Probably not a good idea to send it to a publicly accessible resource then :

Re: log file.

2016-06-14 Thread Paul Owen
Thank you Steven. that is just what I need. regards Paul. -- https://mail.python.org/mailman/listinfo/python-list

Re: log file.

2016-06-14 Thread Steven D'Aprano
On Wed, 15 Jun 2016 05:54 am, Paul Owen wrote: > logging please. > > my pump programme works but I want to log the time etc. when the pump runs > and stops. > > I am trying to improve the programme > > I am a novice! As a novice, start with the simplest thing. Whenever the pump runs or stops,

RE: log file.

2016-06-14 Thread Paul Owen
Gmail Google+ Calendar Web more Inbox pump programme Paul Owen to me 1 hour ago Details from gpiozero import LED,Button from signal import pause print ("Pump Programme Running") led = LED(17) low = Button (2) high = Button (3) high.when_pressed = led.on  low.when_released = led.of

RE: log file.

2016-06-14 Thread Joaquin Alzola
>thanks I will look at them. As an example for your guide: ##log_handler### import sys import logging import logging.handlers from configfile_read import * def LogHandler(logger): CONFIG_FILE = ('./conf/' + 'config.ini') config = configfile(CONFIG_FILE) FORMAT = '%(ascti

Re: log file.

2016-06-14 Thread Joel Goldstick
, those prints will show on your screen. If you want to save them to a log file do this: python my_program.py >> my_log_file.log When your program ends, open up my_log_file.log to see what happened. The two > characters will write to the file if it is new, or append to the file if it

RE: log file.

2016-06-14 Thread Paul Owen
thanks I will look at them. -- https://mail.python.org/mailman/listinfo/python-list

RE: log file.

2016-06-14 Thread Joaquin Alzola
>logging please. Check this modules: import logging import logging.handlers This email is confidential and may be subject to privilege. If you are not the intended recipient, please do not copy or disclose its content but contact the sender immediately upon receipt. -- https://mail.python.org/m

Re: log file.

2016-06-14 Thread Paul Owen
logging please. my pump programme works but I want to log the time etc. when the pump runs and stops. I am trying to improve the programme I am a novice! -- https://mail.python.org/mailman/listinfo/python-list

Re: log file.

2016-06-14 Thread John Gordon
In <05d2df77-8cd0-467b-8ab3-54bf730d8...@googlegroups.com> owenpaul...@gmail.com writes: > I have a programme to pump out water from a sump and would like to > log to a readable file when the pump operates. what is the easiest > way to acheive this with python 3. Are you asking for help with log

Re: log file.

2016-06-14 Thread Paul Owen
I am very inexperienced at programming.! is there a lot of code needed to use those modules. regards paul. -- https://mail.python.org/mailman/listinfo/python-list

Re: log file.

2016-06-14 Thread Jussi Piitulainen
owenpaul...@gmail.com writes: > I have a programme to pump out water from a sump and would like to log > to a readable file when the pump operates. what is the easiest way to > acheive this with python 3. Depending on any number of details, the easiest may be to just print. Direct stdout and stde

log file.

2016-06-14 Thread owenpaul . po
I have a programme to pump out water from a sump and would like to log to a readable file when the pump operates. what is the easiest way to acheive this with python 3. -- https://mail.python.org/mailman/listinfo/python-list

Re: How to log the output from the multiple telnet sessions to separate log file

2015-10-27 Thread dieter
manjunatha.mahalinga...@gmail.com writes: > ... > I created the my own class MyLogger and passing log file name to it. I'm > seeing no log is being written to passed log file instead everything is > written to the logfilename [actually logfilename is variable with file name]

Re: How to log the output from the multiple telnet sessions to separate log file

2015-10-19 Thread manjunatha . mahalingappa
want to open. > Use those objects method to operate on the sessions. Hello Dieter, I created the my own class MyLogger and passing log file name to it. I'm seeing no log is being written to passed log file instead everything is written to the logfilename [actually logfilename is

Re: How to log the output from the multiple telnet sessions to separate log file

2015-10-17 Thread manjunatha . mahalingappa
On Friday, October 16, 2015 at 11:11:58 PM UTC-7, dieter wrote: > manjunatha.mahalinga...@gmail.com writes: > > I'm very much new to python. > > I'm doing the automation for networking device testing , I will be opening > > the 4 telnet session, and doing some testing operations on each of those

Re: How to log the output from the multiple telnet sessions to separate log file

2015-10-17 Thread manjunatha . mahalingappa
On Friday, October 16, 2015 at 11:06:24 PM UTC-7, Chris Angelico wrote: > On Sat, Oct 17, 2015 at 4:47 PM, wrote: > > class Logger(): > > def __init__(self,log): > > self.terminal = sys.stdout > > self.log = log > > > > def write(self, message): > > self.terminal.w

Re: How to log the output from the multiple telnet sessions to separate log file

2015-10-16 Thread dieter
manjunatha.mahalinga...@gmail.com writes: > I'm very much new to python. > I'm doing the automation for networking device testing , I will be opening > the 4 telnet session, and doing some testing operations on each of those > telnet sessions and capture or log the respective output in 4 differ

Re: How to log the output from the multiple telnet sessions to separate log file

2015-10-16 Thread Chris Angelico
On Sat, Oct 17, 2015 at 4:47 PM, wrote: > class Logger(): > def __init__(self,log): > self.terminal = sys.stdout > self.log = log > > def write(self, message): > self.terminal.write(message) > self.log.write(message) > > > for (dname, ip, port) in tuple

How to log the output from the multiple telnet sessions to separate log file

2015-10-16 Thread manjunatha . mahalingappa
all the 4 log files have the same content kindly help me to log the output respective log file. Code snippet is given below: import sys import PmTelnet2 import logging import re import time class Logger(): def __init__(self,log): sel

Re: Python - parsing nested information and provide it in proper format from log file

2015-02-20 Thread Peter Otten
jt11...@gmail.com wrote: > On Friday, February 20, 2015 at 8:11:59 AM UTC-5, Peter Otten wrote: >> Jay T wrote: >> >> > have some log file which has nested data which i want to filter and >> > provide specific for student with total counts >> > >

Re: Python - parsing nested information and provide it in proper format from log file

2015-02-20 Thread jt11380
On Friday, February 20, 2015 at 8:11:59 AM UTC-5, Peter Otten wrote: > Jay T wrote: > > > have some log file which has nested data which i want to filter and > > provide specific for student with total counts > > > > Here is my log file sample: > > Stude

Re: Python - parsing nested information and provide it in proper format from log file

2015-02-20 Thread Peter Otten
Jay T wrote: > have some log file which has nested data which i want to filter and > provide specific for student with total counts > > Here is my log file sample: > Student name is ABC > Student age is 12 > student was late > student was late > student was late >

Python - parsing nested information and provide it in proper format from log file

2015-02-19 Thread Jay T
have some log file which has nested data which i want to filter and provide specific for student with total counts Here is my log file sample: Student name is ABC Student age is 12 student was late student was late student was late Student name is DEF student age is 13 student was late

Re: Need help in pulling SQL query out of log file...

2014-10-13 Thread Sagar Deshmukh
On Monday, 13 October 2014 22:40:07 UTC-7, alex23 wrote: > On 14/10/2014 11:47 AM, Sagar Deshmukh wrote: > > > I have a log file which has lot of information like..SQL query.. number of > > records read...records loaded etc.. > > > My requirement is i would like to r

Re: Need help in pulling SQL query out of log file...

2014-10-13 Thread alex23
On 14/10/2014 11:47 AM, Sagar Deshmukh wrote: I have a log file which has lot of information like..SQL query.. number of records read...records loaded etc.. My requirement is i would like to read the SQL query completly and write it to another txt file.. Generally we encourage people to post

Need help in pulling SQL query out of log file...

2014-10-13 Thread Sagar Deshmukh
Hi, I have a log file which has lot of information like..SQL query.. number of records read...records loaded etc.. My requirement is i would like to read the SQL query completly and write it to another txt file.. also the log file may not be always same so can not make static choices... my

RE: creating log file with Python logging module

2014-08-05 Thread Arulnambi Nandagoban
-Message d'origine- De : Python-list [mailto:python-list-bounces+a.nandagoban=traxens@python.org] De la part de Peter Otten Envoyé : Monday, August 4, 2014 4:03 PM À : python-list@python.org Objet : Re: creating log file with Python logging module Peter Otten wrote: > Pet

Re: creating log file with Python logging module

2014-08-04 Thread Peter Otten
Peter Otten wrote: > Peter Otten wrote: > >> You won't see a rollover if you restart it. > > Sorry, I tried it and the above statement is wrong. [Arulnambi Nandagoban] > logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - > %(message)s', datefmt='%a, %d %b %Y %H:%M:%S', level

Re: creating log file with Python logging module

2014-08-04 Thread Peter Otten
Peter Otten wrote: > You won't see a rollover if you restart it. Sorry, I tried it and the above statement is wrong. -- https://mail.python.org/mailman/listinfo/python-list

Re: creating log file with Python logging module

2014-08-04 Thread Peter Otten
Arulnambi Nandagoban wrote: > I am using logging module for my application to log all debug information. > I configured it create a new log file every day with > > "TimedRotatingFileHandler". I display debug message in console as well. > But I didn't see creatio

creating log file with Python logging module

2014-08-04 Thread Arulnambi Nandagoban
Hello all, I am using logging module for my application to log all debug information. I configured it create a new log file every day with "TimedRotatingFileHandler". I display debug message in console as well. But I didn't see creation of new file. Can someone help me t

Re: Reading in cooked mode (was Re: Python MSI not installing, log file showing name of a Viatnemese communist revolutionary)

2014-03-27 Thread Mark H Harris
On 3/25/14 6:38 PM, Dennis Lee Bieber wrote: A couple of us managed to "steal" the school login/password (don't think we ever used it, but...)... The teaching assistant didn't notice the paper tape punch was active when persuaded to login to let us run a short program (high school BASIC

Re: Reading in cooked mode (was Re: Python MSI not installing, log file showing name of a Viatnemese communist revolutionary)

2014-03-24 Thread Mark H Harris
On 3/24/14 6:30 PM, Dennis Lee Bieber wrote: {And I recall standard practice was to hit \r, to return the carriage, \n for next line, and one RUBOUT to provide a delay while the carriage returned to the left} Yes, yes... I remember well, there had to be a delay (of some type) to wait for the h

Re: Reading in cooked mode (was Re: Python MSI not installing, log file showing name of a Viatnemese communist revolutionary)

2014-03-23 Thread Mark H Harris
On 3/23/14 10:17 PM, Chris Angelico wrote: Newline style IS relevant. You're saying that this will copy a file perfectly: out = open("out", "w") for line in open("in"): out.write(line) but it wouldn't if the iteration and write stripped and recreated newlines? Incorrect, because this versi

Re: Reading in cooked mode (was Re: Python MSI not installing, log file showing name of a Viatnemese communist revolutionary)

2014-03-23 Thread Chris Angelico
a C program: separated by \0 and the last one has to be terminated too. In some situations, you would completely ignore the "c" in the last example. When you're watching a growing log file, buffering might mean that you see half of a line. When you're reading MUD text from a socket, a

Re: Reading in cooked mode (was Re: Python MSI not installing, log file showing name of a Viatnemese communist revolutionary)

2014-03-23 Thread Steven D'Aprano
On Sun, 23 Mar 2014 12:37:43 +1100, Chris Angelico wrote: > On Sun, Mar 23, 2014 at 12:07 PM, Steven D'Aprano > wrote: >> On Sun, 23 Mar 2014 02:09:20 +1100, Chris Angelico wrote: >> >>> On Sun, Mar 23, 2014 at 1:50 AM, Steven D'Aprano >>> wrote: Line endings are terminators: they end the l

Re: Reading in cooked mode (was Re: Python MSI not installing, log file showing name of a Viatnemese communist revolutionary)

2014-03-22 Thread Cameron Simpson
On 23Mar2014 12:37, Chris Angelico wrote: > On Sun, Mar 23, 2014 at 12:07 PM, Steven D'Aprano > wrote: > > On Sun, 23 Mar 2014 02:09:20 +1100, Chris Angelico wrote: > >> On Sun, Mar 23, 2014 at 1:50 AM, Steven D'Aprano > >> wrote: > >>> Line endings are terminators: they end the line. Whether yo

Reading in cooked mode (was Re: Python MSI not installing, log file showing name of a Viatnemese communist revolutionary)

2014-03-22 Thread Chris Angelico
On Sun, Mar 23, 2014 at 12:07 PM, Steven D'Aprano wrote: > On Sun, 23 Mar 2014 02:09:20 +1100, Chris Angelico wrote: > >> On Sun, Mar 23, 2014 at 1:50 AM, Steven D'Aprano >> wrote: >>> Line endings are terminators: they end the line. Whether you consider >>> the terminator part of the line or not

Re: Python MSI not installing, log file showing name of a Viatnemese communist revolutionary

2014-03-22 Thread Steven D'Aprano
On Sun, 23 Mar 2014 02:09:20 +1100, Chris Angelico wrote: > On Sun, Mar 23, 2014 at 1:50 AM, Steven D'Aprano > wrote: >> Line endings are terminators: they end the line. Whether you consider >> the terminator part of the line or not is a matter of opinion (is the >> cover of a book part of the bo

Re: Python MSI not installing, log file showing name of a Viatnemese communist revolutionary

2014-03-22 Thread Chris Angelico
On Sun, Mar 23, 2014 at 1:50 AM, Steven D'Aprano wrote: > Line endings are terminators: they end the line. Whether you consider the > terminator part of the line or not is a matter of opinion (is the cover > of a book part of the book?) but consider this: > > If you say that the end of lines a

Re: Python MSI not installing, log file showing name of a Viatnemese communist revolutionary

2014-03-22 Thread Steven D'Aprano
On Fri, 21 Mar 2014 22:58:37 -0500, Mark H Harris wrote: > I notice (since moving my stuff to Thunderbird two weeks back) the > double spacing you keep squawking about, but I don't find it the big > nuisance you're talking about; ok, so we have to scroll a bit further. It's not the scrolling that

Re: Python MSI not installing, log file showing name of a Viatnemese communist revolutionary

2014-03-22 Thread cool-RR
On Saturday, March 22, 2014 3:39:21 AM UTC+2, Terry Reedy wrote: > Does your .b2 install work? Can you delete it thru the programs list? I uninstalled it before this entire adventure. -- https://mail.python.org/mailman/listinfo/python-list

Re: Python MSI not installing, log file showing name of a Viatnemese communist revolutionary

2014-03-22 Thread Mark Lawrence
On 22/03/2014 08:54, wxjmfa...@gmail.com wrote: Le samedi 22 mars 2014 05:59:34 UTC+1, Mark H. Harris a écrit : On 3/21/14 11:46 PM, Chris Angelico wrote: (Side point: You have your 0d and your 0a backwards; the Unix line ending is U+000A, and the Windows default is U+000D U+000A.)

Re: Python MSI not installing, log file showing name of a Viatnemese communist revolutionary

2014-03-22 Thread Mark Lawrence
On 22/03/2014 03:58, Mark H Harris wrote: On 3/21/14 5:44 PM, Mark Lawrence wrote: I'm pleased to see that you have answers. In return would you either use the mailing list https://mail.python.org/mailman/listinfo/python-list or read and action this https://wiki.python.org/moin/GoogleGroupsPytho

Re: Python MSI not installing, log file showing name of a Viatnemese communist revolutionary

2014-03-22 Thread Terry Reedy
On 3/22/2014 5:50 AM, Steven D'Aprano wrote: On Sat, 22 Mar 2014 01:24:33 -0400, Terry Reedy wrote: If I were in charge of the software used for this list, I would replace Mark with a custom addition to return mis-formated posts (more blank lines than not) with instructions on how to fix them.

Re: Python MSI not installing, log file showing name of a Viatnemese communist revolutionary

2014-03-22 Thread Steven D'Aprano
On Sat, 22 Mar 2014 01:24:33 -0400, Terry Reedy wrote: > On 3/22/2014 12:30 AM, Mark H Harris wrote: >> On 3/21/14 11:15 PM, Chris Angelico wrote: >>> It compounds. One reply makes for double spacing... two makes >>> quadruple, three means we have seven wasted lines between every pair >>> of real

Re: Python MSI not installing, log file showing name of a Viatnemese communist revolutionary

2014-03-22 Thread wxjmfauth
Le samedi 22 mars 2014 05:59:34 UTC+1, Mark H. Harris a écrit : > On 3/21/14 11:46 PM, Chris Angelico wrote: > > > (Side point: You have your 0d and your 0a backwards; the Unix line > > > ending is U+000A, and the Windows default is U+000D U+000A.) > > > > Yeah, I know... smart apple. > >

Re: Python MSI not installing, log file showing name of a Viatnemese communist revolutionary

2014-03-21 Thread Chris Angelico
On Sat, Mar 22, 2014 at 4:24 PM, Terry Reedy wrote: > If I were in charge of the software used for this list, I would replace Mark > with a custom addition to return mis-formated posts (more blank lines than > not) with instructions on how to fix them. But I am not. I love how this makes it sound

Re: Python MSI not installing, log file showing name of a Viatnemese communist revolutionary

2014-03-21 Thread Terry Reedy
On 3/22/2014 12:30 AM, Mark H Harris wrote: On 3/21/14 11:15 PM, Chris Angelico wrote: It compounds. One reply makes for double spacing... two makes quadruple, three means we have seven wasted lines between every pair of real lines. That gets pretty annoying. And considering that most people who

Re: Python MSI not installing, log file showing name of a Viatnemese communist revolutionary

2014-03-21 Thread Mark H Harris
On 3/21/14 11:46 PM, Chris Angelico wrote: (Side point: You have your 0d and your 0a backwards; the Unix line ending is U+000A, and the Windows default is U+000D U+000A.) Yeah, I know... smart apple. How are you going to make people change? What are you going to make them change to? Who co

Re: Python MSI not installing, log file showing name of a Viatnemese communist revolutionary

2014-03-21 Thread Chris Angelico
On Sat, Mar 22, 2014 at 3:30 PM, Mark H Harris wrote: > All files should have standard delimiters. What I used to call flat-text > files should have standard line-end delimiters, and standard file-end EOF > markers. All OS's should comply with the standard... for instance, there > should not be a

Re: Python MSI not installing, log file showing name of a Viatnemese communist revolutionary

2014-03-21 Thread Mark H Harris
On 3/21/14 11:30 PM, Mark H Harris wrote: All OS's should comply with the standard... for instance, there should not be a windows x'0a' x'0d' line ending, and a unix x'0d' line ending. whoops... I meant unix x'0a' line ending...;-) '\n' :-)) -- https://mail.python.org/mailman/listinf

Re: Python MSI not installing, log file showing name of a Viatnemese communist revolutionary

2014-03-21 Thread Mark H Harris
On 3/21/14 11:15 PM, Chris Angelico wrote: It compounds. One reply makes for double spacing... two makes quadruple, three means we have seven wasted lines between every pair of real lines. That gets pretty annoying. And considering that most people who reply without cleaning up the lines also kee

Re: Python MSI not installing, log file showing name of a Viatnemese communist revolutionary

2014-03-21 Thread Chris Angelico
On Sat, Mar 22, 2014 at 2:58 PM, Mark H Harris wrote: > On 3/21/14 5:44 PM, Mark Lawrence wrote: >> >> I'm pleased to see that you have answers. In return would you either use >> the mailing list https://mail.python.org/mailman/listinfo/python-list or >> read and action this https://wiki.python.or

Re: Python MSI not installing, log file showing name of a Viatnemese communist revolutionary

2014-03-21 Thread Mark H Harris
On 3/21/14 5:44 PM, Mark Lawrence wrote: I'm pleased to see that you have answers. In return would you either use the mailing list https://mail.python.org/mailman/listinfo/python-list or read and action this https://wiki.python.org/moin/GoogleGroupsPython to prevent us seeing double line spacing

Re: Python MSI not installing, log file showing name of a Viatnemese communist revolutionary

2014-03-21 Thread Terry Reedy
On 3/21/2014 6:55 PM, cool-RR wrote: On Saturday, March 22, 2014 12:25:03 AM UTC+2, Chris Angelico wrote: (First and a halfth question: When you say "won't install", exactly what do you mean? For completeness, I'll answer this question I forgot to answer, in case someone still wants to invest

Re: Python MSI not installing, log file showing name of a Viatnemese communist revolutionary

2014-03-21 Thread cool-RR
On Saturday, March 22, 2014 12:25:03 AM UTC+2, Chris Angelico wrote: > (First and a halfth question: When you say "won't install", exactly > what do you mean? For completeness, I'll answer this question I forgot to answer, in case someone still wants to investigate: It just showed the first dialo

Re: Python MSI not installing, log file showing name of a Viatnemese communist revolutionary

2014-03-21 Thread cool-RR
On Saturday, March 22, 2014 12:42:56 AM UTC+2, Chris Angelico wrote: > I think you should follow the internet version of Hanlon's Razor here: > Damaged transmission before deliberate tampering. :) It's far more > likely something simply got misdownloaded, and your guess about > timezones is the mos

Re: Python MSI not installing, log file showing name of a Viatnemese communist revolutionary

2014-03-21 Thread Mark Lawrence
On 21/03/2014 22:34, cool-RR wrote: I'm pleased to see that you have answers. In return would you either use the mailing list https://mail.python.org/mailman/listinfo/python-list or read and action this https://wiki.python.org/moin/GoogleGroupsPython to prevent us seeing double line spacing

Re: Python MSI not installing, log file showing name of a Viatnemese communist revolutionary

2014-03-21 Thread Chris Angelico
On Sat, Mar 22, 2014 at 9:34 AM, cool-RR wrote: > I did download from python.org. I checked the md5, it was incorrect, then I > downloaded again by using a proxy in Austria. (Which hopefully the communists > haven't be able to infiltrate? ;) > I think you should follow the internet version of H

Re: Python MSI not installing, log file showing name of a Viatnemese communist revolutionary

2014-03-21 Thread cool-RR
Here's the offending MSI, if anyone wants to investigate: https://dl.dropboxusercontent.com/u/1927707/python-3.4.0.amd64.msi On Saturday, March 22, 2014 12:34:06 AM UTC+2, cool-RR wrote: > I did download from python.org. I checked the md5, it was incorrect, then I > downloaded again by using a

Re: Python MSI not installing, log file showing name of a Viatnemese communist revolutionary

2014-03-21 Thread cool-RR
I did download from python.org. I checked the md5, it was incorrect, then I downloaded again by using a proxy in Austria. (Which hopefully the communists haven't be able to infiltrate? ;) Now it worked! Woohoo! I'm still curious about the bad installation file... And what Ho Chi Minh is doing

Re: Python MSI not installing, log file showing name of a Viatnemese communist revolutionary

2014-03-21 Thread Chris Angelico
On Sat, Mar 22, 2014 at 9:05 AM, cool-RR wrote: > I downloaded it, but the MSI won't install. It didn't work on both of my > computers (Windows 7 64bit). > > What the hell. Was python.org hacked by communists? First question: Where did you download from? What file did you get? (First and a half

Re: Python MSI not installing, log file showing name of a Viatnemese communist revolutionary

2014-03-21 Thread cool-RR
Sorry, couldn't attach the file, here's the log file: https://gist.github.com/anonymous/9697505 On Saturday, March 22, 2014 12:05:59 AM UTC+2, cool-RR wrote: > Hi everybody, > > > > I need to install Python 3.4 final urgently, because my IDE stopped > supporting

Python MSI not installing, log file showing name of a Viatnemese communist revolutionary

2014-03-21 Thread cool-RR
Hi everybody, I need to install Python 3.4 final urgently, because my IDE stopped supporting Python 3.4 beta2, and I need it urgently to work. I downloaded it, but the MSI won't install. It didn't work on both of my computers (Windows 7 64bit). I managed to have the MSI dump data to

Re: Re for Apache log file format

2013-10-09 Thread Piet van Oostrum
Sam Giraffe writes: > Hi, > > I am trying to split up the re pattern for Apache log file format and seem to > be having some > trouble in getting Python to understand multi-line pattern: > > #!/usr/bin/python > > import re > > #this is a single line > string

Re: Re for Apache log file format

2013-10-08 Thread Cameron Simpson
read these. I haven't done any Apache log file work | since long before the csv module was available, but it just might | work. You can definitely do this. I pull things out of apache log files using awk in exactly this fashion. It does rely on each of the "real" fields having a fix

Re: Re for Apache log file format

2013-10-08 Thread Skip Montanaro
> Aiui apache log format uses space as delimiter, encapsulates strings in > '"' characters, and uses '-' as an empty field. Specifying the field delimiter as a space, you might be able to use the csv module to read these. I haven't done any Apache log file w

Re: Re for Apache log file format

2013-10-08 Thread Denis McMahon
On Mon, 07 Oct 2013 23:33:31 -0700, Sam Giraffe wrote: > I am trying to split up the re pattern for Apache log file format and > seem to be having some trouble in getting Python to understand > multi-line pattern: Aiui apache log format uses space as delimiter, encapsulates s

Re: Re for Apache log file format

2013-10-08 Thread Neil Cerutti
On 2013-10-08, Sam Giraffe wrote: > > Hi, > > I am trying to split up the re pattern for Apache log file format and seem > to be having some trouble in getting Python to understand multi-line > pattern: > > #!/usr/bin/python > > import re > > #this is a s

Re: Re for Apache log file format

2013-10-08 Thread Andreas Perstinger
On 08.10.2013 08:33, Sam Giraffe wrote: #this is a single line string = '192.168.122.3 - - [29/Sep/2013:03:52:33 -0700] "GET / HTTP/1.0" 302 276 "-" "check_http/v1.4.16 (nagios-plugins 1.4.16)"' #trying to break up the pattern match for easy to read code pattern = re.compile(r'(?P\d{1,3}\.\d{1,3

Re for Apache log file format

2013-10-08 Thread Sam Giraffe
Hi, I am trying to split up the re pattern for Apache log file format and seem to be having some trouble in getting Python to understand multi-line pattern: #!/usr/bin/python import re #this is a single line string = '192.168.122.3 - - [29/Sep/2013:03:52:33 -0700] "GET / HTTP/1.

Re: direct print to log file

2010-10-06 Thread Sion Arrowsmith
Dave Angel wrote: >If you want to be able to go back to the original, then first bind >another symbol to it. Or restore from sys.__stdout__, as long as you're sure that nothing else has rebound sys.stdout first (or don't mind clobbering it). -- \S under construction -- http://mail.pytho

Re: direct print to log file

2010-10-05 Thread Benjamin Kaplan
On Tue, Oct 5, 2010 at 10:41 AM, Dave Angel wrote: > On 2:59 PM, Dirk Nachbar wrote: > >> How can I direct all print to a log file, eg some functions have their >> own print and I cannot put a f.write() in front of it. >> >> Dirk >> >> > When code

Re: direct print to log file

2010-10-05 Thread Dave Angel
On 2:59 PM, Dirk Nachbar wrote: How can I direct all print to a log file, eg some functions have their own print and I cannot put a f.write() in front of it. Dirk When code does a print() without specifying a file, it goes to sys.stdout So you just have to create a new file object and

Re: direct print to log file

2010-10-05 Thread Diez B. Roggisch
Dirk Nachbar writes: > How can I direct all print to a log file, eg some functions have their > own print and I cannot put a f.write() in front of it. you can replace sys.stdout with something that performs logging. class MyWriter(object): def __init__(self, old_

direct print to log file

2010-10-05 Thread Dirk Nachbar
How can I direct all print to a log file, eg some functions have their own print and I cannot put a f.write() in front of it. Dirk -- http://mail.python.org/mailman/listinfo/python-list

Re: Parse a log file

2010-01-18 Thread kak...@gmail.com
On Jan 18, 11:56 pm, Tim Chase wrote: > kak...@gmail.com wrote: > > I want to parse a log file with the following format for > > example: > >               TIMESTAMPE            Operation     FileName > > Bytes > > 12/Jan/2010:16:04:59 +0200   EXISTS       sampl

  1   2   >