Hi all!
I have a file with data structure derived from wvdial log:
Oct 14 11:03:45 cc02695 pppd[3092]: Sent 3489538 bytes, received
43317854 bytes.
I want to get the 10th field of each line and get the sum for all lines
(total my net data usage). In awk u can easily pop it using field variabl
bibi midi wrote:
Hi all!
I have a file with data structure derived from wvdial log:
Oct 14 11:03:45 cc02695 pppd[3092]: Sent 3489538 bytes, received
43317854 bytes.
I want to get the 10th field of each line and get the sum for all
lines (total my net data usage). In awk u can easily pop
"Khalid Al-Ghamdi" wrote
class Robot:
population = 0
def __init__(self, name):
self.name=name
print ('initializing {0}'.format(self.name))
Robot.population+=1
def __del__(self):
'''I'm dying'''
print ('{0} is being destroyed!'.format(self.name))
On Mon, Oct 26, 2009 at 3:20 AM, Christian Witts wrote:
> fInput = open('/path/to/log.file', 'rb')
> total_usage = 0
> for line in fInput:
> total_usage += int(line.split(' ')[9].strip())
> print total_usage
>
It's actually bad to assign a variable to the file object in this case
(flinput = ...
Alan Gauld wrote:
>
>
> "elca" wrote
>
>> i want to use IE.navigate function with beautifulsoup or lxml..
>> if anyone know about this or sample.
>
> the parsers both effectively replace the browser so you
> can't really use any functions of IE to modify soup or lxml.
>
> Why do you wan
On Sun, Oct 25, 2009 at 6:53 PM, Katt wrote:
> Hello all,
>
> Currently I am working on a program that reads text from a text file. I
> would like it to place the information int a list and inside the information
> would have sublists of information.
>
> The text file looks like this:
>
> "Old Te
On Mon, Oct 26, 2009 at 2:12 PM, Luke Paireepinart
wrote:
>
>
> On Mon, Oct 26, 2009 at 3:20 AM, Christian Witts
> wrote:
>
>> fInput = open('/path/to/log.file', 'rb')
>> total_usage = 0
>> for line in fInput:
>> total_usage += int(line.split(' ')[9].strip())
>> print total_usage
>>
>
> It's ac
"elca" wrote
i want to use IE.navigate function with beautifulsoup or lxml..
if anyone know about this or sample.
Why do you want to use navigate()? What are you trying to do?
There is likely to be another way to do it from Python.
so why i try to use PAMIE or IE
http://elca.pastebin.com/
Hello, I need your help in designing a function. I have created this
script to check out if certain column in some csv files has value "0":
import csv
def zerofound(csvfile, outputfile, lastcolumn ):
"""Finds columns with zero prices. Column have 0 index"""
final = csv.writer(open(outputf
On Mon, Oct 26, 2009 at 2:08 PM, Eduardo Vieira wrote:
> Hello, I need your help in designing a function. I have created this
> script to check out if certain column in some csv files has value "0":
>
> import csv
>
> def zerofound(csvfile, outputfile, lastcolumn ):
>"""Finds columns with zero
SyntaxError at /
("'return' outside function",
('c:\\Users\\Vincent\\Documents\\django_bookmarks\\..\\django_bookmarks\\boo
kmarks\\views.py', 15, None, 'return HttpResponse(output)\n'))
As you can tell I am very new to this I am realizing that it is very
important that indention and syntax
> Exception Type: SyntaxError at /
>
> Exception Value: ("'return' outside function",
> ('c:\\Users\\Vincent\\Documents\\django_bookmarks\\..\\django_bookmarks\\bookmarks\\views.py',
> 15, None, 'return HttpResponse(output)\n'))
>
The Error message indicates that you've diagnosed the problem
corre
Alan Gauld wrote:
>
>
> "elca" wrote
>
i want to use IE.navigate function with beautifulsoup or lxml..
if anyone know about this or sample.
>>> Why do you want to use navigate()? What are you trying to do?
>>> There is likely to be another way to do it from Python.
>
>> so why i
Vincent Jones wrote:
SyntaxError at /
("'return' outside function",
('c:\\Users\\Vincent\\Documents\\django_bookmarks\\..\\django_bookmarks\\boo
kmarks\\views.py', 15, None, 'return HttpResponse(output)\n'))
from django.http import HttpResponse
def main_page(request) :
output = '''
Luke Paireepinart wrote:
On Mon, Oct 26, 2009 at 2:08 PM, Eduardo Vieira wrote:
Hello, I need your help in designing a function. I have created this
script to check out if certain column in some csv files has value "0":
import csv
def zerofound(csvfile, outputfile, lastcolumn ):
"""Find
"Eduardo Vieira" wrote
def zerofound(csvfile, outputfile, lastcolumn ):
"""Finds columns with zero prices. Column have 0 index"""
final = csv.writer(open(outputfile, 'wb'), dialect='excel')
reader = csv.reader(open(csvfile, 'rb'), dialect='excel')
for row in reader:
if '0'
16 matches
Mail list logo