[Tutor] string replacements using dictionaries

Victor R. Cardona vcardon@siue.edu
Fri, 21 Dec 2001 14:32:16 -0600


--gKMricLos+KVdGMg
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Fri, Dec 21, 2001 at 02:57:20PM -0500, dman wrote:
> On Fri, Dec 21, 2001 at 12:28:28PM -0600, Victor R. Cardona wrote:
> | On Fri, Dec 21, 2001 at 01:16:45PM -0500, dman wrote:
> | > On Fri, Dec 21, 2001 at 11:56:45AM -0600, Victor R. Cardona wrote:
> | > | I am having a bit of a problem with string replacements. I am writi=
ng a
> | > | cgi script that reads in a html file and subtitutes all of the '%(k=
ey)s'
> | > | markers for the values in a dictionary. There are five such markers
> | > | containing four different keys. The dictionary has values assigned =
for
> | > | the four keys. However, when I run the script I get "TypeError: Not
> | > | enough arguements for format string" Does anyone have any idea as to
> | > | what I am doing wrong?
> | >=20
> | > Not without seeing the code.  This works fine for me :
>=20
> | Yeah, that works for me too. I have included the code below.
>=20
> Ok, I found the problem :

Thanks! I will make the changes.

-v
--=20
Victor R. Cardona
Powered by SuSE Linux 7.1 (i386) Professional
GPG key ID E81B3A1C
Key fingerprint =3D 0147 A234 99C3 F4C5 BC64  F501 654F DB49 E81B 3A1C

--gKMricLos+KVdGMg
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE8I5xQZU/bSegbOhwRArmRAKCsRvZWZz64YfsoJyaUogKqFH/hDACeIMNQ
FsOeWrHfBUWh3wQqlEER+Ew=
=uIGP
-----END PGP SIGNATURE-----

--gKMricLos+KVdGMg--