Hi All,
I am trying to fish through the history file for the Konquerer web
browser, and pull out the
web sites visited.
The file's encoding is binary or something
Here is the first section of the file:
'\x00\x00\x00\x02\xb8,\x08\x9f\x00\x00z\xa8\x00\x00\x01\xf4\x00\x00\x01\xf4\x00\x00\x00t\x00f
Hi All,
I am trying to fish through the history file for the Konquerer web
browser, and pull out the
web sites visited.
The file's encoding is binary or something
Here is the first section of the file:
'\x00\x00\x00\x02\xb8,\x08\x9f\x00\x00z\xa8\x00\x00\x01\xf4\x00\x00\x01\xf4\x00\x00\x00t\x00f
Hi Alan and other Gurus,
if you look carefully at the string below, you see
that in amongst the "\x" stuff you have the text I want:
z tfile://home/alpha
which I know to be an address on my system, plus a bit of preceeding txt.
Alan Gauld wrote:
>> The file's encoding is binary or something
>>
>>
Hi Alan,
I found a pretty complicated way to do it (Alan's way is way more elegant).
In case someone is searching the archive, maybe they will find something
in it that is useful.
It uses the regular experessions module.
import re
def dehexlify_websites(fle):
# get binary data
inpt = open
Hi All,
I was wondering if anyone had used os.path.walk within a class or not,
and what are the pitfalls...
What has got me worried is that the function called by os.path.walk
must be a method of the class.
Now this means it will have something like this as a def:
def func_called_by_walk(self
Thanks guys,
I will have a go at both of the methods.
Matt
Alan Gauld wrote:
>> Yes, that is the right way to do it and it will work fine. Something
>> like
>>
>> class Walker(object):
>> def walk(self, base):
>>os.path.walk(base, self.callback, None)
>>
>
>
>> What happens is, when
Hi All,
How do I go about sending an attachment with SMTP lib?
Thanks,
Matt
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
Hi Python Gurus,
I am trying to mail a txt file, then with another client I
get the email and extract the text file.
The email I send however, does not seem to turn out correctly.
The content dispositon header is there, but it seems to be in the wrong
place and my email
client the text file just
Basically a dumb question I can't seem to find the answer to.
How do I execute a bash command from within a python program.
I've been looking through my book on python, and the docs, but can't
seem to find something so basic (sure it is
there, but I am not looking for the correct terms, I guess)