<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
&gt;&gt;&gt; '0x' + hex(543)[2:].zfill(5)<BR>'0x0021f'<BR><BR>
this is a good way but it's still in string format. but if i convert it to long, then the leading 0s will be truncated. i guess can't have it both way. <BR>
&nbsp;<BR>
&nbsp;<BR>
&nbsp;<BR>
<BR clear=all><BR>&nbsp;<BR>
&nbsp;<BR>
<BR>_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor<BR>                                               </body>
</html>