Example #1
0
def hidden():
	return 'inaccessible!'

# Try to bless ourselves real good.
import pennmush
import sys

try:
	pennmush.bless(sys.modules[__name__])
except ValueError, ex:
	pass
Example #2
0
import sys

# PennMUSH closes stdin and stdout, so redirect to stderr for safety.
sys.stdin = sys.stderr
sys.stdout = sys.stderr

# Include GAMEDIR/python in our import path.
sys.path.insert(0, 'python')

del sys

# Bless __main__, then prevent further blessing.
import pennmush

import __main__
pennmush.bless(__main__)

pennmush.bless(None)

#
# Some test code for now.
#
def smoosh_string(*args):
	return ' '.join(args)

def test_fun(arg):
	return 42

def empty_fun():
	pass