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

Roman Suzi rnd at onego.ru
Tue Jul 10 07:15:06 CEST 2001


On Tue, 10 Jul 2001, Steve S.L. Wong wrote:

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

Pribably:

import string

# ...
for command in string.split(line, ";"):
  # ...


Sincerely yours, Roman Suzi
-- 
_/ Russia _/ Karelia _/ Petrozavodsk _/ rnd at onego.ru _/
_/ Tuesday, July 10, 2001 _/ Powered by Linux RedHat 6.2 _/
_/ "<CTRL>-<ALT>-<DEL> is the key to success" _/





More information about the Python-list mailing list