String formatting characters - looking for details

Mark Pilgrim f8dy at my-deja.com
Wed Feb 7 21:28:15 EST 2001


In article <6Pkg6.39716$o5.497716 at e420r-atl1.usenetserver.com>,
  "Steve Holden" <sholden at holdenweb.com> wrote:
> "Martin Bless" <m.bless at gmx.de> wrote in message
> news:3a81cfa2.1708851 at news.muenster.de...
> > (1) Where can I find some more details about the string formatting
> > characters?
> > (2) How  I print hex values with zeros padded left, like 0F or 0A?
> > print '%X' % 15  # two digits, wanted
>
> 1. If you have a UNIX system handy, the man page on printf(3) will tell you

And if you don't, it's Google to the rescue!  Search for "printf format
identifiers".  I found lots of very useful pages, like this one: 
http://www.cs.huji.ac.il/support/docs/reference/C/FUNCTIONS/format.html

-M
--
You're smart; why haven't you learned Python yet?  http://diveintopython.org/


Sent via Deja.com
http://www.deja.com/



More information about the Python-list mailing list