print fmstr % str <= possible??

Joshua Muskovitz joshm at taconic.net
Mon Jan 21 21:39:26 EST 2002


Sure, just replace

myprint("The x pos is %2.3", x)
myprint("The y pos is %5.3", y)

with

myprint("The x pos is %2.3f", x)
myprint("The y pos is %5.3f", y)

(You forgot the "f" in your strings.)

--
# Joshua Muskovitz
# joshm at taconic.net
def lyyrs(sig): return '-'.join(sig.split()+["ly y'rs"])
lyyrs('Hire me!  I need the work!')




-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----==  Over 80,000 Newsgroups - 16 Different Servers! =-----



More information about the Python-list mailing list