I want to take '\x01'
and get 1 from it, i.e., convert to ``int. Any ideas? Thanks
>>> ord("\x01")
1
>>> ord("\x02")
2
>>> ord("\x7f")
127
Reference : http://stackoverflow.com/questions/1411658/how-to-get-x01-to-1
'Python' 카테고리의 다른 글
python code를 바꾼 다음 인터프리터에 반영하기 (0) | 2012.07.13 |
---|---|
display class instance name & print class (0) | 2012.07.13 |
Python 관련 사이트 모음... (0) | 2012.02.16 |
Python에서의 File Read 함수 비교 (0) | 2012.02.07 |
Python을 위한 Vimrc script (0) | 2012.02.04 |