Newbie asks: How to translate this line of C to Py

Ville Vainio vvainio at karhu.tp.spt.fi
Tue Jul 10 02:25:52 EDT 2001


"Steve S.L. Wong" <steve at hkit.net> writes:

> while (command = strtok(line_ptr,";"),line_ptr=0,command) {
> }

As an aside, I would advise you to stay away from C strtok(), which is
severely broken (uses static space).

In python, look up string.split for strtok-ish functionality.



-- 
Ville Vainio - http://www.tp.spt.fi/~vvainio - ICQ #115524762
 Wild geese have no intention to cast a reflection
 Water has no mind to assume their form



More information about the Python-list mailing list