[Tutor] Re: Convert list to literal string.

Derrick 'dman' Hudson dman@dman13.dyndns.org
Sat Jun 28 10:44:02 2003


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

On Sat, Jun 28, 2003 at 09:40:06AM -0500, Decibels wrote:
| Having a little problem with part of my program.
| I had a little setup program I wrote to populate a database.
| In the setup I used literal strings for the symbols, and figured later
| I would have it take command-line options for them.
|=20
| Problem is now, I can't get the function to work with the list, only if
| I enter the data as literal strings.
|=20
| Example:
|=20
| stocks =3D "IBM,EK"
|=20
| send that to the yahooquotes module and works fine!

Ok.

| When I enter them from the command-line though it doesn't
| It comes as a list and won't work. =20

What is the code that exhibits this?

Command line arguments are always strings until the application turns
them into other data structures.

| Is there a way to make a list into a literal?

Lists can be converted into strings in many ways.  The one you want to
use depends entirely on the structure of the list you have and the
desired format of the string you want.

-D

--=20
If your company is not involved in something called "ISO 9000" you
probably have no idea what it is.  If your company _is_ involved in ISO
9000 then you definitely have no idea what it is.
                                (Scott Adams - The Dilbert principle)
=20
http://dman13.dyndns.org/~dman/

--pf9I7BMVVzbSWLtt
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

iEYEARECAAYFAj79qZgACgkQiB6vp1xAVUAXdwCeLhkCk9ntUkZFLQ+OoHX8XGQc
PkYAn0d14qnp2e91NXbh4OOHBXHoUrX/
=X/9Q
-----END PGP SIGNATURE-----

--pf9I7BMVVzbSWLtt--