ord('\xf0')
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
Ravi Kondamuru wrote:
Reasons for C:
1. The log files I am working are 60-100MB files. I *assumed* using C
will reduce the parse time.
2. The records themselves are variable length and hence was concerned
about the complexity for implementation in python.
3. Since I am not using a database, eac
Ravi Kondamuru a écrit :
I am trying to read a binary log file to extract system counters. These
counters will then be used to generate web-based graphs using the
chart-director api in python. For extracting the counters I planning to
write a program in C to read and give the output as lists for
Thanks to all for the replies!
The FeedParser example is mind-bending (at least for this noob), but of
course looks very powerful. And thanks for the tips on cleaning up the
appearance of the code with sup-patterns. Those regex's can get hairy pretty
fast.
On Thu, 11 Dec 2008 21:56:19 +, Alan Gauld wrote:
> "Bryan Fodness" wrote
>
>>I am trying to change values in a file. The following code does not
>>seem to
>> find the attribute.
>>
>> def anonymize(obj, attr):
>>try:
>>obj.attr = 'Anonymize'
>>except AttributeError:
>>
On Thursday 11 December 2008, Ravi Kondamuru wrote:
> This was a great info exchange for me.
> I am going to try out the all-python solution and see how it works
> out. thank you all,
You could try to optimize slow parts with the compiled Cython
language. Nearly all Python code is legal Cython; b
On 12/12/2008, spir wrote:
> I just found a simple, but nice, trick to make regexes less unlegible.
> Using substrings to represent sub-patterns. E.g. instead of:
[...]
Another option is to use the re.VERBOSE flag. This allows you to put
comments in your regular expression and use whitespace fo
Serdar Tumgoren a écrit :
Hey everyone,
I was wondering if there is a way to use the datetime module to check for
variations on a month name when performing a regex match?
In the script below, I created a regex pattern that checks for dates in the
following pattern: "August 31, 2007". If there
"Bryan Fodness" wrote
I am trying to change values in a file. The following code does not
seem to
find the attribute.
def anonymize(obj, attr):
try:
obj.attr = 'Anonymize'
except AttributeError:
pass
This code is looking for an attribute of obj called attr
It is not us
I am trying to change values in a file. The following code does not seem to
find the attribute.
def anonymize(obj, attr):
try:
obj.attr = 'Anonymize'
except AttributeError:
pass
for fname in os.listdir(os.curdir):
plan=ReadFile(fname)
anonymize(plan, 'Name')
It s
This was a great info exchange for me.
I am going to try out the all-python solution and see how it works out.
thank you all,
Ravi.
On Thu, Dec 11, 2008 at 10:59 AM, Ravi Kondamuru wrote:
> Reasons for C:
> 1. The log files I am working are 60-100MB files. I *assumed* using C will
> reduce the pa
On Thu, Dec 11, 2008 at 11:49:16AM, Asif Iqbal wrote:
> I am looking for a way to feed a message from stdin to a python based
> mime parser, detach all attachments and drop them to a dir, and then
> send the email to the recipient. The attachment(s) will be replaced
> by an URL to a link.
>
> So
On Thu, Dec 11, 2008 at 2:31 PM, Serdar Tumgoren wrote:
> Hey everyone,
>
> I was wondering if there is a way to use the datetime module to check for
> variations on a month name when performing a regex match?
Parsing arbitrary dates is hard, in fact the most general case is not
solvable since 7/
With the amount of information provided so far, I'd say you need to step
back and question your initial assumptions. Python shouldn't have a
great deal of trouble reading variable-length binary data blocks, and
the overhead of doing that is probably a lot less than it would be to
have another
Hey everyone,
I was wondering if there is a way to use the datetime module to check for
variations on a month name when performing a regex match?
In the script below, I created a regex pattern that checks for dates in the
following pattern: "August 31, 2007". If there's a match, I can then print
Ravi Kondamuru a écrit :
I am trying to read a binary log file to extract system counters. These
counters will then be used to generate web-based graphs using the
chart-director api in python. For extracting the counters I planning to
write a program in C to read and give the output as lists for
Reasons for C:
1. The log files I am working are 60-100MB files. I *assumed* using C will
reduce the parse time.
2. The records themselves are variable length and hence was concerned about
the complexity for implementation in python.
3. Since I am not using a database, each request to refresh the g
Ravi Kondamuru wrote:
I am trying to read a binary log file to extract system counters. These
counters will then be used to generate web-based graphs using the
chart-director api in python. For extracting the counters I planning to
write a program in C to read and give the output as lists for u
Ravi Kondamuru wrote:
I am expecting these lists to be huge and was hoping to avoid re-parsing
in python. Any way for the c program to return a list that python can
Mind if I ask the obvious question here? Why are you wanting to avoid
parsing in Python? Any time you have one program (in any
Ravi Kondamuru wrote:
I am trying to read a binary log file to extract system counters.
These counters will then be used to generate web-based graphs using
the chart-director api in python. For extracting the counters I
planning to write a program in C to read and give the output as lists
for
Ravi Kondamuru wrote:
I am expecting these lists to be huge and was hoping to avoid
re-parsing in python. Any way for the c program to return a list that
python can directly use.
Not as far as I know. Lists in Python are internal objects. If you were
able to package the C and Python programs
I am trying to read a binary log file to extract system counters. These
counters will then be used to generate web-based graphs using the
chart-director api in python. For extracting the counters I planning to
write a program in C to read and give the output as lists for use by
chart-director. If p
I am expecting these lists to be huge and was hoping to avoid re-parsing in
python. Any way for the c program to return a list that python can directly
use.
Thanks for the pointer to json :) I am going to explore and evaluate
re-parsing overhead.
thanks,
Ravi.
On Thu, Dec 11, 2008 at 10:19 AM, bob
Ravi Kondamuru wrote:
Hi,
I am writing a script to read list output from a C executable. How
should c program be written so that python can read the output as a list?
Any pointers to info on this appreciated.
The possibilities are truly wide open on this. Python can read a
variety of standa
Ravi Kondamuru wrote:
Hi,
I am writing a script to read list output from a C executable. How
should c program be written so that python can read the output as a list?
Any pointers to info on this appreciated.
Funny that a C programmer is asking for pointers, when C has lots of
pointers and P
Hi,
I am writing a script to read list output from a C executable. How should c
program be written so that python can read the output as a list?
Any pointers to info on this appreciated.
thanks,
Ravi.
___
Tutor maillist - Tutor@python.org
http://mail.py
I am looking for a way to feed a message from stdin to a python based
mime parser, detach all attachments and drop them to a dir, and then
send the email to the recipient. The attachment(s) will be replaced
by an URL to a link.
So basically decouple the attachments (>1MB in size) and modify the
b
28 matches
Mail list logo