creating a hex value

David Bear david.bear at asu.edu
Wed Jun 1 14:37:49 EDT 2005


I have a file that I need to parse. Items in it are delimited by a hex 15
(0x015). I know it must be trivial to assign a hex value to a variable but
I'm not seeing it in my python essential ref. how can I do

delim = 0x15
while:
        ln = file.read()
        if ln[0] == delim:
                do something

I've looked at the hex function but it doesn't sound like what I want.

-- 
David Bear
-- let me buy your intellectual property, I want to own your thoughts --



More information about the Python-list mailing list