Revision 0f2e977af415a52dd8dd51a8d1b3e08b65336af2 authored by alex@thinkpad on 03 March 2017, 17:48:02 UTC, committed by alex@thinkpad on 03 March 2017, 17:48:02 UTC
1 parent eaa8ca8
hello.py
print("Hello, World!")
# simple loop test
k = 0
for i in range(100):
for j in range(100):
k += 1
print(k)
# math test (not yet working)
# import math
# print(1/2, 2**3, math.sin(math.pi/4), math.log(10,2))
# introspection test - what functions are available?
def dir(x):
if "__doc__" in x:
print(x.__doc__)
members = [str(e) for e in x]
members.sort()
print(", ".join(members))
M = [m for m in MODULES]
M.sort()
for m in M:
if m in ["parse", "tokenize", "encode", "py2bc"]:
continue
print("\nModule", m, ":")
dir(MODULES[m])
Computing file changes ...