Re: Set on hex string using python library
François Dumont <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <[email protected]> |
Ok, it works. The result is 186:190:186:190:250:206. Would it be possible to have the same result in hexadecimal ? If not, I can go with that. Thank you 2009/8/5 Vincent Bernat <[email protected]> > > On Wed, 5 Aug 2009 10:13:41 +0100, François Dumont > <[email protected]> wrote: > > > I tried ":".join("%02x" % ord(a) for a in HardwareAddress) but I got the > > error "ord() expected a character, but string of length 6 found". > > Yes, try: > ":".join("%02x" % ord(a) for a in HardwareAddress[0]) > > I missed the fact that you got a tuple with a string, not just a string. > ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Net-snmp-users mailing list [email protected] Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users