[Tutor] text processing, reformatting

2012-12-12 Thread lconrad
From an much larger, messy report file, I extracted these lines: OPM010 HUNT INGR FRI 16/11/12 00:00:00 QRTR HTGP PEG OVFL 0012 0 0 0022 0 0 0089 0 0 0379 0 0 OPM010 HUNT INGR FRI 16/11/12 00:15:00 QRTR HTGP PEG OVFL 0012 0 0 0022 0 0 0089 0

Re: [Tutor] text processing, reformatting

2012-12-12 Thread Steven D'Aprano
On 13/12/12 01:34, lcon...@go2france.com wrote: From an much larger, messy report file, I extracted these lines: OPM010 HUNT INGR FRI 16/11/12 00:00:00 QRTR HTGP PEG OVFL 0012 0 0 0022 0 0 0089 0 0 0379 0 0 OPM010 HUNT INGR FRI 16/11/12 00:15:00 QRTR HTGP PEG

Re: [Tutor] text processing, reformatting

2012-12-12 Thread Joel Goldstick
On Wed, Dec 12, 2012 at 9:34 AM, lcon...@go2france.com wrote: ... OPM010 HUNT INGR FRI 16/11/12 01:00:00 QRTR HTGP PEG OVFL 0012 0 0 0022 0 0 0089 0 0 0379 0 0 OPM010 HUNT INGR FRI 16/11/12 01:15:00 QRTR HTGP PEG OVFL 0012 0 0 0022 0

[Tutor] Proper useage of open

2012-12-12 Thread frank ernest
I want to open a file so I read the library useage because I could not recall the propor useage. I typed in to my script: a = open (dupli, r) and got an error stating that dupli is not deffined. I started the script from within to same directorie that the file dupli was in. Perhaps it needs

Re: [Tutor] Proper useage of open

2012-12-12 Thread Matthew Ngaha
I typed in to my script: a = open (dupli, r) and got an error stating that dupli is not deffined. it needs the quotes around it. so try: a = open (dupli, r) ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options:

Re: [Tutor] Proper useage of open

2012-12-12 Thread Alan Gauld
On 12/12/12 21:09, frank ernest wrote: I want to open a file so I read the library useage because I could not recall the propor useage. I typed in to my script: a = open (dupli, r) and got an error stating that dupli is not deffined. It sounds as if dupli is the name of your file however you

[Tutor] reading web page with BeautifulSoup

2012-12-12 Thread Ed Owens
from urllib2 import urlopen page = urlopen('w1.weather.gov/obhistory/KDCA.html') Traceback (most recent call last): File stdin, line 1, in module File /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py, line 126, in urlopen return _opener.open(url,

Re: [Tutor] reading web page with BeautifulSoup

2012-12-12 Thread शंतनू
On 13/12/12 12:47 PM, Ed Owens wrote: from urllib2 import urlopen page = urlopen('w1.weather.gov/obhistory/KDCA.html') Traceback (most recent call last): File stdin, line 1, in module File /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py, line 126, in

Re: [Tutor] reading web page with BeautifulSoup

2012-12-12 Thread Dave Angel
On 12/12/2012 08:47 PM, Ed Owens wrote: from urllib2 import urlopen page = urlopen('w1.weather.gov/obhistory/KDCA.html') Traceback (most recent call last): File stdin, line 1, in module File /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py, line 126,

Re: [Tutor] reading web page with BeautifulSoup

2012-12-12 Thread Ed Owens
On 12/12/12 9:03 PM, Dave Angel wrote: On 12/12/2012 08:47 PM, Ed Owens wrote: from urllib2 import urlopen page = urlopen('w1.weather.gov/obhistory/KDCA.html') Traceback (most recent call last): File stdin, line 1, in module File

[Tutor] reading web page with BeautifulSoup

2012-12-12 Thread Don Jennings
On Dec 12, 2012, at 8:54 PM, tutor-requ...@python.org wrote: Date: Wed, 12 Dec 2012 20:47:58 -0500 From: Ed Owens eowens0...@gmx.com To: tutor@python.org Subject: [Tutor] reading web page with BeautifulSoup Message-ID: 50c933ce.5010...@gmx.com Content-Type: text/plain; charset=ISO-8859-1;