Skip to content

Commit

Permalink
Small updated to demo/pfunc.py.
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobjoaquin committed Jul 26, 2009
1 parent 01e1205 commit 757cb29
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion demo/pfunc.py
Expand Up @@ -159,6 +159,9 @@ def fround(x, n=8):

return float(('%.' + str(n) + 'f') % x)

def pfunc(score, statement, identifier, pfield):
return sco.map_(score, {0: statement, 1: identifier}, pfield, __eval_this)

if __name__ == '__main__':
# Get argv from command-line
statement = list(sys.argv[1])
Expand All @@ -172,5 +175,5 @@ def fround(x, n=8):
s = ''.join(sys.stdin.readlines())

# Where the magic happens
print sco.map_(s, {0: statement, 1: identifier}, pfield, __eval_this),
print pfunc(s, statement, identifier, pfield),

0 comments on commit 757cb29

Please sign in to comment.