well, I'm in the beginings of making a random sentence generator for a mod my friend makes, but I want the nouns, verbs pastverbs, etc. to be easily customizable by editing a file, but, last night file() worked fine and today it's saying " line 1: `read_who = file('who.ini', 'r')'"
here's what I have so far, but for reference it's possible I'm just being an idiot because I'm very new to Python and programming in general read_who = file('who.ini', 'r') who = read_who.read() read_what = file('what.ini', 'r') what = read_what.read() read_end = file('end.ini', 'r') end = read_end.read() read_because = file('because.ini', 'r') because = read_because.read() read_the = file('the.ini', 'r') da = read_the.read() read_period = file('punc.ini', 'r') period = read_period.read() prd = read_period.read() read_nouns = file('nouns.ini', 'r') nouns = read_nouns.read() read_verbs = file('verbs.ini', 'r') verbs = read_verbs.read() read_pastverbs = file('pastverbs.ini', 'r') pastverbs = read_pastverbs.read()
-- http://mail.python.org/mailman/listinfo/python-list