~ubuntu-branches/ubuntu/trusty/exabgp/trusty

« back to all changes in this revision

Viewing changes to build/lib.linux-x86_64-2.7/exabgp/utils.py

  • Committer: Package Import Robot
  • Author(s): Henry-Nicolas Tourneur
  • Date: 2012-03-22 12:00:00 UTC
  • mfrom: (1.1.4)
  • Revision ID: package-import@ubuntu.com-20120322120000-v4aj8h69mhpmgbjq
Tags: 2.0.7-1

* New upstream release
* Fix bad clean target for build/ directory

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/usr/bin/env python
2
 
# encoding: utf-8
3
 
"""
4
 
utils.py
5
 
 
6
 
Created by Thomas Mangin on 2009-09-06.
7
 
Copyright (c) 2009-2011 Exa Networks. All rights reserved.
8
 
"""
9
 
 
10
 
import sys
11
 
import time
12
 
 
13
 
import StringIO
14
 
import traceback
15
 
 
16
 
def hexa (value):
17
 
        return "%s" % [(hex(ord(_))) for _ in value]
18
 
 
19
 
def hexdump (value):
20
 
        print hexa(value)
21
 
 
22
 
def trace ():
23
 
        buff = StringIO.StringIO()
24
 
        traceback.print_exc(file=buff)
25
 
        r = buff.getvalue()
26
 
        buff.close()
27
 
        return r
 
 
b'\\ No newline at end of file'